Skip to content

Instantly share code, notes, and snippets.

@Denperidge
Last active August 14, 2021 15:14
Show Gist options
  • Save Denperidge/e83158088a9dac6da7865809bad38fd8 to your computer and use it in GitHub Desktop.
Save Denperidge/e83158088a9dac6da7865809bad38fd8 to your computer and use it in GitHub Desktop.
Raspberry Pi Nextcloud-Docker

Raspberry Pi Nextcloud-Docker

  • MySQL/MariaDB doesn't have an armhf docker image by default, hence postgresql is used instead
  • For some reason, the postgres env variables don't seem to work. If that's the case, use nextcloud for for DB and USER, and localhost:5432 for HOST
  • I used Caddy for HTTPS encryption
  • NEXTCLOUD_DATA_DIR=/var/www/html/data fixes a config write issue. The fix was found on this SO post!
POSTGRES_DB=nextcloud
POSTGRES_USER=nextcloud
POSTGRES_PASSWORD=
NEXTCLOUD_DATA_DIR=/var/www/html/data
NEXTCLOUD_PORT=8080
version: "2"
services:
app:
volumes:
- /mnt/hdd/media:/mnt/media
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: postgres:alpine
restart: unless-stopped
volumes:
- ./postgres:/var/lib/postgresql/data
env_file:
- .env
app:
image: nextcloud
restart: unless-stopped
links:
- db
volumes:
- ./nextcloud:/var/www/html
env_file:
- .env
ports:
- ${NEXTCLOUD_PORT}:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment