semillero-special-hotel/docker-compose.yml
gabogg 41fb0d0d75 feat: implement phase 5 settlements and i18n support
- Add English/Spanish translation system for UI pages
- Add bilingual AI audit notes using translation LLM chains in n8n
- Support zero-trust Docker routing to dev stack via internal hostnames
- Quiet down Next.js database query and middleware logging in test runs
2026-06-12 19:00:46 +00:00

78 lines
2.5 KiB
YAML

version: '3.8'
services:
# -----------------------------------------------------------------------------
# Production Application Instance
# -----------------------------------------------------------------------------
app-prod:
build:
context: .
dockerfile: Dockerfile
container_name: special-hotel-prod
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL}
- N8N_WEBHOOK_SECRET=${N8N_WEBHOOK_SECRET}
# Log tag prefix for syslog / journald, or environment labeling for standard output
logging:
driver: "json-file"
options:
tag: "app-prod/{{.Name}}"
max-size: "10m"
max-file: "3"
networks:
- default
- proxy
# -----------------------------------------------------------------------------
# Development & Testing Application Instance
# -----------------------------------------------------------------------------
app-dev:
build:
context: .
dockerfile: Dockerfile
container_name: special-hotel-dev
restart: no # Do not auto-restart if variables are missing or if it gracefully stops
ports:
- "127.0.0.1:3001:3000"
environment:
- NODE_ENV=development
- DATABASE_URL=${DATABASE_URL_DEV}
- TEST_DATABASE_URL=${TEST_DATABASE_URL}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL_DEV}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET_DEV}
- N8N_TEST_WEBHOOK_URL=${N8N_TEST_WEBHOOK_URL}
- N8N_WEBHOOK_SECRET=${N8N_WEBHOOK_SECRET_DEV}
# Commands run a pre-startup verification. If development-exclusive
# variables are missing, it logs a warning and exits with code 0 (graceful exit).
entrypoint: >
/bin/sh -c "
if [ -z \"$${TEST_DATABASE_URL}\" ] || [ -z \"$${N8N_TEST_WEBHOOK_URL}\" ]; then
echo '[DEV] Required development-exclusive variables (TEST_DATABASE_URL, N8N_TEST_WEBHOOK_URL) are missing.';
echo '[DEV] Gracefully shutting down the development service with exit code 0.';
exit 0;
fi;
echo '[DEV] Starting Next.js development server...';
exec npm run dev
"
logging:
driver: "json-file"
options:
tag: "app-dev/{{.Name}}"
max-size: "10m"
max-file: "3"
networks:
- default
- proxy
networks:
default:
proxy:
external: true