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>
31 lines
753 B
YAML
31 lines
753 B
YAML
services:
|
|
fastify:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- DATABASE_URL
|
|
- STRIPE_SECRET_KEY
|
|
- STRIPE_WEBHOOK_SECRET
|
|
- DOMAIN
|
|
- PORT=3000
|
|
- ADMIN_EMAIL
|
|
- ADMIN_PASSWORD
|
|
- COOKIE_SECRET
|
|
- NODE_ENV=production
|
|
networks:
|
|
- coolify
|
|
- default
|
|
restart: unless-stopped
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.rebours.rule=Host(`rebours.studio`)
|
|
- traefik.http.routers.rebours.entrypoints=https
|
|
- traefik.http.routers.rebours.tls=true
|
|
- traefik.http.routers.rebours.tls.certresolver=letsencrypt
|
|
- traefik.http.services.rebours.loadbalancer.server.port=3000
|
|
|
|
networks:
|
|
coolify:
|
|
external: true
|