Files
moraworld/coolify-compose.yml
T
Lizandro GuarnizoandClaude Sonnet 4.6 b4cbb672e0 fix(coolify): quitar ports y red custom para evitar conflictos en despliegue
Coolify usa Traefik como proxy — los ports fijos causan conflicto si el
puerto ya está ocupado. Se elimina también moraworld-network (nombre fijo
choca con redes de deploys anteriores); Coolify gestiona su propia red.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 21:39:23 -05:00

73 lines
1.9 KiB
YAML

# Coolify Deployment — docker-compose for production (managed DB/Redis by Coolify)
services:
api:
image: ghcr.io/lizandrogd/moraworld-imports/api:latest
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://localhost: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:
image: ghcr.io/lizandrogd/moraworld-imports/web:latest
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