Linora

0018. Dev environment: Postgres in Docker Compose

Status: Accepted (2026-11-27)

Context (checked 2026-11-27)

Decision

docker-compose.yml (Phase 0) with postgres:18-alpine, port 5432, named volume, healthcheck; DATABASE_URL=postgres://linora:linora@localhost:5432/linora. The blob store is a local directory in dev (LINORA_BLOB_DIR=.data/blobs, gitignored); production uses an S3-compatible bucket. Dev runs each tier as its own process (npm run dev:web|api|realtime|docworker|compactor|mcp). Tests use a separate database created per run (linora_test_<pid>). psql is used inside the container (docker compose exec db psql), so nothing is installed on the host.

Alternatives

brew install postgresql@18 (host install, version drift between machines), embedded Postgres npm packages (large binaries).

Consequences

Server tests require Docker running; CI uses the same image as a service container. The 100k-connection load test runs on Linux (two boxes or one box with loopback aliases), not on the macOS dev machine.