services: # ── Postgres + pgvector ────────────────────────────────────────────── postgres: build: context: . dockerfile: Dockerfile.postgres container_name: courtmitra_pg restart: unless-stopped environment: POSTGRES_USER: courtmitra POSTGRES_PASSWORD: courtmitra POSTGRES_DB: courtmitra ports: - "5432:5432" volumes: - courtmitra_pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U courtmitra -d courtmitra"] interval: 5s timeout: 5s retries: 10 # ── Inngest Dev Server ───────────────────────────────────────────────── inngest: image: inngest/inngest:v1.22.0 container_name: courtmitra_inngest restart: unless-stopped command: ["inngest", "dev", "-u", "http://worker:3002/api/inngest"] ports: - "8288:8288" depends_on: postgres: condition: service_healthy # ── API (NestJS + Fastify) ───────────────────────────────────────────── api: build: context: .. dockerfile: infra/Dockerfile.api container_name: courtmitra_api restart: unless-stopped ports: - "3001:3001" env_file: .env environment: DATABASE_URL: postgres://courtmitra:courtmitra@postgres:5432/courtmitra DIRECT_DATABASE_URL: postgres://courtmitra:courtmitra@postgres:5432/courtmitra LOCAL_STORAGE_DIR: /app/.storage INNGEST_BASE_URL: http://inngest:8288 volumes: - courtmitra_storage:/app/.storage depends_on: postgres: condition: service_healthy extra_hosts: - "host.docker.internal:host-gateway" # ── Worker (Inngest functions) ───────────────────────────────────────── worker: build: context: .. dockerfile: infra/Dockerfile.worker container_name: courtmitra_worker restart: unless-stopped ports: - "3002:3002" env_file: .env environment: DATABASE_URL: postgres://courtmitra:courtmitra@postgres:5432/courtmitra DIRECT_DATABASE_URL: postgres://courtmitra:courtmitra@postgres:5432/courtmitra LOCAL_STORAGE_DIR: /app/.storage INNGEST_BASE_URL: http://inngest:8288 volumes: - courtmitra_storage:/app/.storage depends_on: postgres: condition: service_healthy extra_hosts: - "host.docker.internal:host-gateway" # ── Web (Next.js) ────────────────────────────────────────────────────── web: build: context: .. dockerfile: infra/Dockerfile.web container_name: courtmitra_web restart: unless-stopped ports: - "3000:3000" env_file: .env environment: NEXT_PUBLIC_API_BASE_URL: http://localhost:3001/api INTERNAL_API_BASE_URL: http://api:3001/api depends_on: - api volumes: courtmitra_pgdata: courtmitra_storage: