# Coolify Deployment — docker-compose for production (managed DB/Redis by Coolify) services: api: build: context: . dockerfile: apps/api/Dockerfile container_name: moraworld-api restart: unless-stopped environment: - NODE_ENV=production - PORT=3001 - DATABASE_URL=${DATABASE_URL} - REDIS_URL=${REDIS_URL} - JWT_SECRET=${JWT_SECRET} - JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET} - AUDIT_HMAC_SECRET=${AUDIT_HMAC_SECRET} - CORS_ORIGINS=${CORS_ORIGINS} - S3_ENDPOINT=${S3_ENDPOINT} - S3_ACCESS_KEY=${S3_ACCESS_KEY} - S3_SECRET_KEY=${S3_SECRET_KEY} - S3_BUCKET=${S3_BUCKET} - S3_REGION=${S3_REGION} - S3_PUBLIC_URL=${S3_PUBLIC_URL} - STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET} healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3001/api/health"] interval: 30s timeout: 5s retries: 3 start_period: 30s deploy: resources: limits: cpus: '1.0' memory: 1G reservations: cpus: '0.5' memory: 512M web: depends_on: api: condition: service_healthy build: context: . dockerfile: apps/web/Dockerfile args: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL} container_name: moraworld-web restart: unless-stopped environment: - NODE_ENV=production - PORT=3000 - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} - NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL} healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/status"] interval: 30s timeout: 5s retries: 3 start_period: 30s deploy: resources: limits: cpus: '1.0' memory: 1G reservations: cpus: '0.5' memory: 512M