version: '3.8' services: db: image: postgres:15-alpine restart: always environment: POSTGRES_USER: dineflow POSTGRES_PASSWORD: dineflow_password POSTGRES_DB: dineflow volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U dineflow"] interval: 5s timeout: 5s retries: 5 web: build: context: ./apps/web restart: always environment: DATABASE_URL: postgresql://dineflow:dineflow_password@db:5432/dineflow?schema=public NEXTAUTH_URL: https://${DOMAIN:-localhost} NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-super_secret_for_production_only} ports: - "3000:3000" depends_on: db: condition: service_healthy healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"] interval: 30s timeout: 5s retries: 3 volumes: pgdata: