Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philschatz/pi-services
https://github.com/philschatz/pi-services
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/philschatz/pi-services
- Owner: philschatz
- Created: 2022-11-10T14:59:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T16:53:15.000Z (10 months ago)
- Last Synced: 2024-11-19T15:56:27.566Z (2 months ago)
- Language: Shell
- Size: 38.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Install
After gaining ssh access to the raspberry pi device, run the following lines:
```bash
# https://jfrog.com/connect/post/install-docker-compose-on-raspberry-pi/sudo apt-get update
sudo apt-get upgrade --no-install-recommends -y
sudo apt-get install --no-install-recommends -y \
git \
pmount \
downtimed \
unattended-upgrades \
avahi-daemon \
;# https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo rebootcurl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.shsudo usermod -aG docker ${USER}
sudo usermod -aG docker ${USER}
sudo su - ${USER}
docker versionwget https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-linux-$(uname -m) -O docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin/
docker-compose version
```## Make useful preview sizes:
```sh
docker exec -u 33 -it pi-services-app-1 /bin/bash# Then run these in the terminal:
# Source: https://web.archive.org/web/20220531110907/https://ownyourbits.com/2019/06/29/understanding-and-improving-nextcloud-previews/
/var/www/html/occ config:app:set previewgenerator squareSizes --value="32 64 256 512"
/var/www/html/occ config:app:set previewgenerator widthSizes --value="256 384"
/var/www/html/occ config:app:set previewgenerator heightSizes --value="256"/var/www/html/occ config:system:set preview_max_x --value 1024
/var/www/html/occ config:system:set preview_max_y --value 1024
/var/www/html/occ config:system:set jpeg_quality --value 60
/var/www/html/occ config:app:set preview jpeg_quality --value="60"# Generate all the previews
time /var/www/html/occ preview:generate-all
```## Set a cron job to generate previews:
[link](https://github.com/nextcloud/docker/issues/1775#issuecomment-1272609711)
Or mount the spool file: https://davidhettler.net/blog/the-problematic-nextcloud-gallery/
## Disable previews
https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/previews_configuration.html#disabling-previews
## Photoprism
Increase swap size to 2048 (that's enough for Photoprism) https://pimylifeup.com/raspberry-pi-swap-file/
# Tips
If the Desktop Nextcloud client will not upload images because of "413 Request Entity Too Large" error, delete the `.sync_*.db` files in the client sync directory: https://github.com/nextcloud/docker/issues/762#issuecomment-633149958
## Logging
```sh
cd pi-services && docker-compose logs -fjournalctl --follow
htop
```