fix: add missing network configuration for services in Nextcloud Docker Compose

This commit is contained in:
2025-07-01 15:08:26 +08:00
parent 49a09cd242
commit 57e39cbe04
+16
View File
@@ -9,12 +9,16 @@ services:
- db:/var/lib/postgresql/data:Z - db:/var/lib/postgresql/data:Z
env_file: env_file:
- db.env - db.env
networks:
- nextcloud-net
# Note: Redis is an external service. You can find more information about the configuration here: # Note: Redis is an external service. You can find more information about the configuration here:
# https://hub.docker.com/_/redis # https://hub.docker.com/_/redis
redis: redis:
image: redis:alpine image: redis:alpine
restart: always restart: always
networks:
- nextcloud-net
app: app:
image: nextcloud:fpm-alpine image: nextcloud:fpm-alpine
@@ -27,6 +31,8 @@ services:
- REDIS_HOST=redis - REDIS_HOST=redis
env_file: env_file:
- db.env - db.env
networks:
- nextcloud-net
depends_on: depends_on:
- db - db
- redis - redis
@@ -49,6 +55,7 @@ services:
- app - app
networks: networks:
- traefik-public - traefik-public
- nextcloud-net
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: any
@@ -70,6 +77,8 @@ services:
- nextcloud:/var/www/html:z - nextcloud:/var/www/html:z
# NOTE: The `volumes` config of the `cron` and `app` containers must match # NOTE: The `volumes` config of the `cron` and `app` containers must match
entrypoint: /cron.sh entrypoint: /cron.sh
networks:
- nextcloud-net
depends_on: depends_on:
- db - db
- redis - redis
@@ -77,3 +86,10 @@ services:
volumes: volumes:
db: db:
nextcloud: nextcloud:
networks:
traefik-public:
external: true
nextcloud-net:
driver: overlay
attachable: true