Files
filezzy-staging/docker/docker-compose.staging-prod-api.yml
2026-02-04 14:16:04 +01:00

88 lines
3.0 KiB
YAML

# =============================================================================
# Staging: production api-gateway and worker (no dev, no bind mounts)
# =============================================================================
# Use with staging-standalone + staging + staging-prod-frontend. Build context
# is ../backend (from staging-deploy bundle); backend/.env is created from
# .env.staging by deploy script and copied into image by Dockerfile.prod.
# =============================================================================
services:
api-gateway:
build:
context: ../backend
dockerfile: Dockerfile.prod
volumes: []
environment:
- NODE_ENV=production
- PRISMA_QUERY_ENGINE_LIBRARY=/app/node_modules/.prisma/client/libquery_engine-linux-musl-openssl-3.0.x.so.node
- API_PORT=4000
- API_HOST=0.0.0.0
- DATABASE_URL=postgresql://postgres:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-toolsplatform}?schema=app
- REDIS_HOST=redis
- REDIS_PORT=6379
- MINIO_ENDPOINT=minio
- MINIO_PORT=9000
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY:-minioadmin}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY:-minioadmin}
- MINIO_BUCKET=uploads
- MINIO_USE_SSL=false
- KEYCLOAK_URL=http://keycloak:8080
- KEYCLOAK_PUBLIC_URL=${KEYCLOAK_PUBLIC_URL:-http://localhost:8180}
- KEYCLOAK_REALM=${KEYCLOAK_REALM:-toolsplatform}
- KEYCLOAK_ISSUER_URI=${KEYCLOAK_ISSUER_URI:-http://localhost:8180/realms/toolsplatform}
- KEYCLOAK_CLIENT_ID=api-gateway
- KEYCLOAK_CLIENT_SECRET=${KEYCLOAK_CLIENT_SECRET}
- ADMIN_ROLE=platform-admin
- ADMIN_DASHBOARD_ENABLED=true
- STIRLING_PDF_URL=http://stirling-pdf:8080
- IMAGOR_URL=http://imagor:8000
- REMBG_URL=http://rembg:7000
- LANGUAGETOOL_URL=http://languagetool:8010
env_file:
- ../.env.staging
depends_on:
- postgres
- redis
- minio
- keycloak
networks:
- backend
- frontend
- processing
ports:
- "4000:4000"
worker:
build:
context: ../worker
dockerfile: Dockerfile.prod
volumes: []
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-toolsplatform}?schema=app
- REDIS_HOST=redis
- REDIS_PORT=6379
- MINIO_ENDPOINT=minio
- MINIO_PORT=9000
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY:-minioadmin}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY:-minioadmin}
- MINIO_BUCKET=uploads
- MINIO_USE_SSL=false
- REMBG_URL=http://rembg:7000
- IMAGOR_URL=http://imagor:8000
- STIRLING_PDF_URL=http://stirling-pdf:8080
env_file:
- ../.env.staging
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
minio:
condition: service_started
rembg:
condition: service_healthy
networks:
- backend
- processing