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

48 lines
1.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
# create admin account during setup
networks:
nextcloud:
services:
nextcloud:
image: nextcloud:production
container_name: nextcloud
restart: "${RESTART:-no}"
hostname: cloud
domainname: ${BASE_DOMAIN}
environment:
- POSTGRES_HOST=pg-nextcloud
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=${NEXTCLOUD_PG_PWD:-password}
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
networks:
- proxy
- mail
- nextcloud
pg-nextcloud:
image: postgres:${POSTGRES_VERSION}-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