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 nginx: build: nginx restart: unless-stopped ports: - ${NGINX_HTTP_PORT}:80 - ${NGINX_HTTPS_PORT}:443 volumes: - ${SSL_CERT_PATH}:/etc/ssl/certs/server.cert.pem:ro - ${SSL_KEY_PATH}:/etc/ssl/private/server.key.pem:ro environment: NGINX_HOST: ${NGINX_HOST} depends_on: - nextcloud