mandant-crm/docker/docker-compose.prod.yml
Tim Stollberg a95fac5c0d feat(docker): add production docker-compose for Coolify deployment
Coolify builds with --project-directory set to the repo root, which broke
the dev compose file's relative paths. Adds a dedicated prod compose stack
(baked-in code, no bind mounts, no hardcoded secrets, static Nuxt build
served by nginx) so local dev and Coolify no longer share fragile path
assumptions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:59:06 +07:00

55 lines
1.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
networks:
- mandant
nginx:
build:
context: .
dockerfile: docker/frontend/Dockerfile.prod
ports:
- "8899:80"
depends_on:
- backend
networks:
- mandant
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
networks:
- mandant
volumes:
mysql_data:
networks:
mandant:
driver: bridge