Files
CASAN/packages/casan-devkit/templates/project-shell/nestjs-react/docker-compose.yml
T

26 lines
650 B
YAML

services:
backend:
build:
context: .
dockerfile: apps/__PROJECT_SLUG__/backend/Dockerfile
environment:
NODE_ENV: production
PORT: 3000
ports: ["3000:3000"]
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 10s
timeout: 3s
retries: 5
restart: unless-stopped
frontend:
build:
context: .
dockerfile: apps/__PROJECT_SLUG__/frontend/Dockerfile
ports: ["8080:80"]
depends_on:
backend:
condition: service_healthy
restart: unless-stopped