Files
backendDonMarco/docker-compose.yml
2026-06-13 12:04:04 -04:00

56 lines
1.2 KiB
YAML

services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
image: donmarco-backend:1.2.0
container_name: donmarco-api
restart: unless-stopped
environment:
- PORT=4000
- JWT_SECRET=${JWT_SECRET:-cambiar-este-secreto-en-produccion}
- DB_PATH=/app/data/donmarco.db
volumes:
- donmarco_data:/app/data
ports:
- "4000:4000"
networks:
- donmarco_net
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:4000/api/health').then(r=>r.json()).then(d=>process.exit(d.version==='1.2.0'?0:1)).catch(()=>process.exit(1))",
]
interval: 15s
timeout: 10s
retries: 5
start_period: 20s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: /api
APP_VERSION: "1.2.0"
image: donmarco-frontend:1.2.0
container_name: donmarco-web
restart: unless-stopped
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
networks:
- donmarco_net
volumes:
donmarco_data:
networks:
donmarco_net:
driver: bridge