name: leistungsbilanz x-build: &build context: . args: # Baked into .next/routes-manifest.json by next build; see Dockerfile. API_INTERNAL_URL: http://api:3000 x-logging: &logging driver: json-file options: max-size: "20m" max-file: "10" services: api: build: *build command: - sh - -c - node scripts/run-migrations.js && node scripts/db-verify-circuit-schema.js && node dist/server/index.js environment: NODE_ENV: production PORT: "3000" LOG_LEVEL: "${LOG_LEVEL:-info}" init: true restart: unless-stopped logging: *logging ports: - "3000:3000" volumes: - ./data:/app/data healthcheck: test: - CMD - node - -e - fetch('http://localhost:3000/health').then(response=>{if(!response.ok)process.exit(1)}).catch(()=>process.exit(1)) interval: 30s timeout: 3s retries: 5 start_period: 20s web: build: *build command: - node_modules/.bin/next - start - -p - "3001" environment: NODE_ENV: production API_INTERNAL_URL: http://api:3000 NEXT_TELEMETRY_DISABLED: "1" LOG_LEVEL: "${LOG_LEVEL:-info}" init: true restart: unless-stopped logging: *logging depends_on: api: condition: service_healthy ports: - "3001:3001" healthcheck: test: - CMD - node - -e - fetch('http://localhost:3001/web-health').then(response=>{if(!response.ok)process.exit(1)}).catch(()=>process.exit(1)) interval: 30s timeout: 3s retries: 5 start_period: 20s