feat: update Nextcloud service configuration by adding trusted domains and proxies, and commenting out unused Nginx service

This commit is contained in:
2025-07-01 19:33:54 +08:00
parent cd9ead5c82
commit 4273819a2e
+36 -19
View File
@@ -36,28 +36,11 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
NEXTCLOUD_TRUSTED_DOMAINS: cloud.${DOMAIN}
NEXTCLOUD_TRUSTED_PROXIES: ${NEXTCLOUD_TRUSTED_PROXIES}
networks:
- nextcloud-net
# networks:
# - nextcloud-net
depends_on:
- db
- redis
# Note: Nginx is an external service. You can find more information about the configuration here:
# https://hub.docker.com/_/nginx/
web:
image: nginx:alpine-slim
environment:
- DOMAIN=${DOMAIN}
restart: always
expose:
- "80"
volumes:
# https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
# NOTE: The `volumes` included below should match those of the `app` container (unless you know what you're doing)
- nextcloud:/var/www/html:z,ro
depends_on:
- app
networks:
- traefik-public
- nextcloud-net
@@ -76,6 +59,40 @@ services:
- traefik.http.routers.nextcloud.service=nextcloud
- traefik.http.services.nextcloud.loadbalancer.server.port=80
# Note: Nginx is an external service. You can find more information about the configuration here:
# https://hub.docker.com/_/nginx/
# web:
# image: nginx:alpine-slim
# environment:
# - DOMAIN=${DOMAIN}
# restart: always
# expose:
# - "80"
# volumes:
# # https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html
# - ./web/nginx.conf:/etc/nginx/nginx.conf:ro
# # NOTE: The `volumes` included below should match those of the `app` container (unless you know what you're doing)
# - nextcloud:/var/www/html:z,ro
# depends_on:
# - app
# networks:
# - traefik-public
# - nextcloud-net
# deploy:
# restart_policy:
# condition: any
# delay: 5s
# max_attempts: 3
# labels:
# - traefik.enable=true
# - traefik.swarm.network=traefik-public
# - traefik.constraint-label=traefik-public
# - traefik.http.routers.nextcloud.entrypoints=https
# - traefik.http.routers.nextcloud.rule=Host(`cloud.${DOMAIN}`)
# - traefik.http.routers.nextcloud.tls.certresolver=le
# - traefik.http.routers.nextcloud.service=nextcloud
# - traefik.http.services.nextcloud.loadbalancer.server.port=80
cron:
image: nextcloud:fpm-alpine
restart: always