ci: Coolify deployment config — docker-compose, env example, docs, dockerignore
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
# 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
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
|
||||
container_name: moraworld-api
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3001:3001"
|
||||
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: 15s
|
||||
networks:
|
||||
- moraworld-network
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
|
||||
web:
|
||||
image: ghcr.io/lizandrogd/moraworld-imports/web:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/web/Dockerfile
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
|
||||
container_name: moraworld-web
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
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: 15s
|
||||
networks:
|
||||
- moraworld-network
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
|
||||
# Worker opcional: jobs asíncronos (ej. polling couriers, cron SENAE)
|
||||
# worker:
|
||||
# image: ghcr.io/lizandrogd/moraworld-imports/api:latest
|
||||
# command: ["node", "dist/worker.js"]
|
||||
# environment: *api_env
|
||||
# networks: [moraworld-network]
|
||||
# deploy:
|
||||
# resources:
|
||||
# limits:
|
||||
# cpus: '0.5'
|
||||
# memory: 512M
|
||||
|
||||
networks:
|
||||
moraworld-network:
|
||||
driver: bridge
|
||||
name: moraworld-network
|
||||
Reference in New Issue
Block a user