services: api: build: context: . dockerfile: Dockerfile.demo target: demo-runner args: VITE_API_BASE_URL: http://localhost:4000 command: ["npm", "--workspace", "apps/api", "run", "start"] environment: NODE_ENV: production PORT: "4000" CORS_ORIGIN: http://localhost:4173 DEMO_MODE: "true" ports: - "4000:4000" healthcheck: test: - CMD-SHELL - >- node -e "const p=process.env.PORT||4000; const paths=['/health','/api/health']; Promise.any(paths.map((path)=>fetch('http://127.0.0.1:'+p+path).then((r)=>{ if (!r.ok) throw new Error(String(r.status)); }))).then(()=>process.exit(0)).catch(()=>process.exit(1));" interval: 10s timeout: 5s retries: 10 start_period: 15s web: build: context: . dockerfile: Dockerfile.demo target: demo-runner args: VITE_API_BASE_URL: http://localhost:4000 command: [ "npm", "--workspace", "apps/web", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4173" ] environment: NODE_ENV: production VITE_API_BASE_URL: http://localhost:4000 DEMO_MODE: "true" ports: - "4173:4173" depends_on: api: condition: service_healthy healthcheck: test: - CMD-SHELL - >- node -e "fetch('http://127.0.0.1:4173').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1));" interval: 10s timeout: 5s retries: 10 start_period: 10s