fix: connect fastify to coolify network for DB access

The Docker Compose app creates its own isolated network, so the
fastify container cannot reach the PostgreSQL database managed
separately by Coolify. Adding the external 'coolify' network
allows inter-container communication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ordinarthur 2026-03-12 16:47:34 +01:00
parent e8b71e7603
commit e3fb2752b7

View File

@ -13,6 +13,9 @@ services:
- ADMIN_PASSWORD - ADMIN_PASSWORD
- COOKIE_SECRET - COOKIE_SECRET
- NODE_ENV=production - NODE_ENV=production
networks:
- coolify
- default
restart: unless-stopped restart: unless-stopped
labels: labels:
- traefik.enable=true - traefik.enable=true
@ -21,3 +24,7 @@ services:
- traefik.http.routers.rebours.tls=true - traefik.http.routers.rebours.tls=true
- traefik.http.routers.rebours.tls.certresolver=letsencrypt - traefik.http.routers.rebours.tls.certresolver=letsencrypt
- traefik.http.services.rebours.loadbalancer.server.port=3000 - traefik.http.services.rebours.loadbalancer.server.port=3000
networks:
coolify:
external: true