Files
moraworld/coolify-compose.yml
Lizandro Guarnizo 62e48bd372
ci-337446 / run (push) Has been cancelled
ci-377635 / run (push) Has been cancelled
Build & Push Docker images / build-api (push) Has been cancelled
Build & Push Docker images / build-web (push) Has been cancelled
fix: point to Coolify-managed Postgres wkuvmdsy39relyhnugk87eqb
2026-07-12 17:24:15 -05:00

80 lines
2.0 KiB
YAML

# Coolify Deployment — docker-compose for production (managed DB/Redis by Coolify)
networks:
coolify:
external: true
services:
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: moraworld-api
restart: unless-stopped
networks:
- coolify
environment:
- NODE_ENV=production
- PORT=3001
- DATABASE_URL=postgresql://imports:m0r4w0rld_1mp0rts_p4ss!@wkuvmdsy39relyhnugk87eqb:5432/imports?schema=imports
- 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
networks:
- coolify
environment:
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
- NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL}
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1: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