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
+17 -1
View File
@@ -9,12 +9,16 @@ services:
- db:/var/lib/postgresql/data:Z
env_file:
- db.env
networks:
- nextcloud-net
# Note: Redis is an external service. You can find more information about the configuration here:
# https://hub.docker.com/_/redis
redis:
image: redis:alpine
restart: always
networks:
- nextcloud-net
app:
image: nextcloud:fpm-alpine
@@ -27,6 +31,8 @@ services:
- REDIS_HOST=redis
env_file:
- db.env
networks:
- nextcloud-net
depends_on:
- db
- redis
@@ -49,6 +55,7 @@ services:
- app
networks:
- traefik-public
- nextcloud-net
deploy:
restart_policy:
condition: any
@@ -70,10 +77,19 @@ services:
- nextcloud:/var/www/html:z
# NOTE: The `volumes` config of the `cron` and `app` containers must match
entrypoint: /cron.sh
networks:
- nextcloud-net
depends_on:
- db
- redis
volumes:
db:
nextcloud:
nextcloud:
networks:
traefik-public:
external: true
nextcloud-net:
driver: overlay
attachable: true