Skip to main content

Docker Compose

The full stack is defined in backend/docker-compose.yml. Services are grouped by profiles: dev, prod, and test.

Service map

ServiceProfilesPortPurpose
postgres(always)5432Application database (okt)
postgres-tasks(always)5434River task queue database (okt_tasks)
flaresolverrdev, prod8191Headless browser for JS-challenge bypass (Byparr)
qdrantdev, prod6333, 6334Vector store (REST + gRPC)
miniodev9000, 9001S3-compatible object store for dev registry
registry-devdev8081Local knowledge registry (sqlite + S3)
api-devdev8080Go API with hot-reload (bind-mounted source)
frontend-devdev5173Vite dev server (bind-mounted source)
apiprod8080Production API container
frontendprod3000Production frontend (nginx)
test-postgrestest5433Ephemeral tmpfs Postgres for e2e tests

Profiles

Dev

just dev

Boots everything except the test services. The API and frontend are bind-mounted for hot-reload. FlareSolverr, Qdrant, MinIO, and the registry are included.

Prod

just up

Boots the production images (no bind mounts, no MinIO/registry). The frontend is served by nginx.

Test

just test-e2e

Boots only test-postgres (tmpfs, port 5433) and runs the e2e suite against it. Never run e2e tests against the dev database — the test harness drops schemas.

Volumes

VolumeServiceWhat it holds
pgdatapostgresApplication data (users, repos, facts, concepts, syntheses)
pgdata_taskspostgres-tasksRiver job queue data
qdrant_dataqdrantEmbedding vectors
source_assetsapi/api-devInline images, PDF page renders, full PDF bodies
minio_dataminioRegistry S3 objects (dev only)
registry_dataregistry-devRegistry sqlite DB (dev only)

Resetting the dev DB

If golang-migrate complains about a dirty schema_migrations row, use:

just reset-db

This runs down -v through the compose project (removing all named volumes), then boots the dev profile. A bare docker compose down -v may leave stale volumes if the project name differs.