diff --git a/swarm/nextcloud.yaml b/swarm/nextcloud.yaml index cfed77c..7517e2d 100644 --- a/swarm/nextcloud.yaml +++ b/swarm/nextcloud.yaml @@ -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: \ No newline at end of file + nextcloud: + +networks: + traefik-public: + external: true + nextcloud-net: + driver: overlay + attachable: true \ No newline at end of file