nextcloud-docker-compose/docker-compose.yaml

83 lines
2.1 KiB
YAML
Raw Normal View History

secrets:
postgres_db:
file: ./secrets/postgres_db.txt
postgres_user:
file: ./secrets/postgres_user.txt
postgres_password:
file: ./secrets/postgres_password.txt
nextcloud_admin_user:
file: ./secrets/nextcloud_admin_user.txt
nextcloud_admin_password:
file: ./secrets/nextcloud_admin_password.txt
services:
db:
image: postgres:${POSTGRES_TAG}
restart: unless-stopped
volumes:
- ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw
secrets:
- postgres_db
- postgres_user
- postgres_password
environment:
POSTGRES_DB_FILE: /run/secrets/postgres_db
POSTGRES_USER_FILE: /run/secrets/postgres_user
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
redis:
image: redis:alpine
restart: unless-stopped
nextcloud:
build:
context: nextcloud
args:
NEXTCLOUD_TAG: ${NEXTCLOUD_TAG}
restart: unless-stopped
volumes:
- ${VOLUME_PATH}/var/www/html:/var/www/html:rw
secrets:
- postgres_db
- postgres_user
- postgres_password
- nextcloud_admin_user
- nextcloud_admin_password
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DB_FILE: /run/secrets/postgres_db
POSTGRES_USER_FILE: /run/secrets/postgres_user
POSTGRES_HOST: db
NEXTCLOUD_ADMIN_PASSWORD_FILE: /run/secrets/nextcloud_admin_password
NEXTCLOUD_ADMIN_USER_FILE: /run/secrets/nextcloud_admin_user
REDIS_HOST: redis
NEXTCLOUD_TRUSTED_DOMAINS: ${NGINX_HOST}
OVERWRITEPROTOCOL: https
depends_on:
- db
- redis
2022-01-31 20:48:54 +00:00
nginx:
build: nginx
restart: unless-stopped
ports:
- ${NGINX_HTTP_PORT}:80
- ${NGINX_HTTPS_PORT}:443
volumes:
2022-01-31 20:50:11 +00:00
- ${SSL_CERT_PATH}:/etc/ssl/certs/server.cert.pem:ro
- ${SSL_KEY_PATH}:/etc/ssl/private/server.key.pem:ro
2022-01-31 20:48:54 +00:00
environment:
NGINX_HOST: ${NGINX_HOST}
depends_on:
- nextcloud
2022-01-31 21:30:36 +00:00
cron:
image: nextcloud:${NEXTCLOUD_TAG}
restart: unless-stopped
volumes:
- ${VOLUME_PATH}/var/www/html:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis