nginx sat on two Docker networks (Coolify's shared per-app network, where coolify-proxy lives, plus our custom "mandant" bridge). With no explicit traefik.docker.network label, Traefik's Docker provider picked one non-deterministically across deploys — when it picked "mandant", its backend connection went to an unreachable network and silently hung after completing the TLS/HTTP handshake with clients. All services already share Coolify's injected network, so the custom network was redundant. Removing it leaves each container on exactly one network, eliminating the ambiguity.
45 lines
1 KiB
YAML
45 lines
1 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/php/Dockerfile.prod
|
|
environment:
|
|
APP_ENV: production
|
|
APP_DEBUG: "false"
|
|
APP_KEY: ${APP_KEY}
|
|
APP_URL: ${APP_URL}
|
|
DB_HOST: mysql
|
|
DB_DATABASE: ${DB_DATABASE}
|
|
DB_USERNAME: ${DB_USERNAME}
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
RUN_MIGRATIONS: "true"
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/frontend/Dockerfile.prod
|
|
ports:
|
|
- "8899:80"
|
|
depends_on:
|
|
- backend
|
|
|
|
mysql:
|
|
image: mysql:8.0
|
|
environment:
|
|
MYSQL_DATABASE: ${DB_DATABASE}
|
|
MYSQL_USER: ${DB_USERNAME}
|
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes:
|
|
mysql_data:
|