# BACKLOG P1-19 (DX-02): local-only Postgres for developers who want real # persistence instead of the in-memory fallback (lib/db.ts / lib/orders-store.ts # already degrade gracefully without this -- `pnpm dev` / `make dev` work # without it, this is additive). Modeled on the already-proven Postgres # service in infra/docker-compose.yml (same image, same sql/ init mount) -- # not a copy of the full VPS stack (no NocoDB/Metabase/Caddy/worker here, # those are production concerns, not local dev needs). # # UNVERIFIED (2026-08-11): written and reviewed, but not smoke-tested end to # end in this pass -- no Docker daemon was available in the environment this # was authored in. Verify with `docker compose -f compose.dev.yaml up` before # relying on it. services: db: image: pgvector/pgvector:pg16 environment: POSTGRES_USER: opt POSTGRES_PASSWORD: opt-dev-only-not-a-secret POSTGRES_DB: opt ports: - "5432:5432" volumes: - opt-dev-pgdata:/var/lib/postgresql/data - ./sql:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U opt -d opt"] interval: 5s timeout: 5s retries: 10 volumes: opt-dev-pgdata: {}