container-server/services/nextcloud/docker-compose.yml

107 lines
3.5 KiB
YAML

version: '3.7'
# https://hub.docker.com/_/nextcloud/
# https://github.com/nextcloud/docker
# https://docs.nextcloud.com/server/stable/admin_manual/release_schedule.html
# disable cert verification for local smtp connection:
# https://docs.nextcloud.com/server/26/admin_manual/configuration_server/email_configuration.html#tlspeerverification
# https://blog.cubieserver.de/2022/complete-guide-to-nextcloud-oidc-authentication-with-authentik/
# create admin account during setup
# STUN/TURN server for nextcloud talk:
# https://nextcloud-talk.readthedocs.io/en/latest/TURN/
# https://nextcloud-talk.readthedocs.io/en/latest/eturnal/
# https://eturnal.net/doc/container-quick-test.html
# https://github.com/processone/eturnal/tree/master/examples/docker-compose
networks:
nextcloud:
services:
nextcloud:
image: nextcloud:28
container_name: nextcloud
restart: "${RESTART:-no}"
hostname: cloud
domainname: ${BASE_DOMAIN}
environment:
- APACHE_DISABLE_REWRITE_IP=1
- TRUSTED_PROXIES=10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
- OVERWRITEPROTOCOL=https
- POSTGRES_HOST=pg-nextcloud
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password}
- REDIS_HOST=redis-nextcloud
volumes:
- ${BASE_DIR:-/srv}/nextcloud/html:/var/www/html # Main folder, needed for updating
- ${BASE_DIR:-/srv}/nextcloud/apps:/var/www/html/custom_apps # installed / modified apps
- ${BASE_DIR:-/srv}/nextcloud/config:/var/www/html/config # local configuration
- ${BASE_DIR:-/srv}/nextcloud/data:/var/www/html/data # the actual data of your Nextcloud
- ${BASE_DIR:-/srv}/nextcloud/themes:/var/www/html/themes # theming/branding
depends_on:
- pg-nextcloud
- redis-nextcloud
networks:
- proxy
- mail
- nextcloud
nextcloud-cron:
image: nextcloud:28
container_name: nextcloud-cron
restart: "${RESTART:-no}"
entrypoint: /cron.sh
volumes:
- ${BASE_DIR:-/srv}/nextcloud/html:/var/www/html # Main folder, needed for updating
- ${BASE_DIR:-/srv}/nextcloud/apps:/var/www/html/custom_apps # installed / modified apps
- ${BASE_DIR:-/srv}/nextcloud/config:/var/www/html/config # local configuration
- ${BASE_DIR:-/srv}/nextcloud/data:/var/www/html/data # the actual data of your Nextcloud
- ${BASE_DIR:-/srv}/nextcloud/themes:/var/www/html/themes # theming/branding
depends_on:
- pg-nextcloud
- redis-nextcloud
networks:
- nextcloud
pg-nextcloud:
image: postgres:16-alpine
container_name: pg-nextcloud
restart: "${RESTART:-no}"
environment:
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password}
volumes:
- ${BASE_DIR:-/srv}/nextcloud/psql:/var/lib/postgresql/data
networks:
- nextcloud
redis-nextcloud:
image: redis:7-alpine
container_name: redis-nextcloud
restart: "${RESTART:-no}"
networks:
- nextcloud
eturnal:
image: ghcr.io/processone/eturnal:1.12
container_name: eturnal
restart: "${RESTART:-no}"
hostname: eturnal
domainname: ${BASE_DOMAIN}
user: 9000:9000
read_only: true
cap_drop:
- ALL
environment:
- ETURNAL_SECRET=${ETURNAL_SECRET}
- ETURNAL_RELAY_MIN_PORT=50000
- ETURNAL_RELAY_MAX_PORT=50050
ports:
- 3478:3478 # STUN/TURN non-TLS
- 3478:3478/udp # STUN/TURN non-TLS
- 50000-50050:50000-50050/udp