Scope: a single-instance pilot deployment — not a public self-serve
offering yet.
docker-compose.yml remains the reference for local
development; this page covers actually putting the API online, as
documented in docs/DEPLOY.md.Image
Dockerfile (multi-stage, built on uv) produces an image that, on
container start, applies Alembic migrations and then launches uvicorn
on port 8100.
Dockerfile contents
Dockerfile contents
Recommended target: Fly.io
Chosen because it’s plain Docker underneath (no strong lock-in) and Fly offers a managed Postgres with thepgvector extension.
1
Detect the Dockerfile
fly.toml.2
Managed Postgres
3
Enable pgvector
Once on the database, after
fly postgres attach (Alembic migrations
assume CREATE EXTENSION IF NOT EXISTS vector, already present in
alembic/versions/0001_initial.py — nothing else needed on Fly’s
side beyond a Postgres image that supports the extension).4
Environment variables
fly secrets set NAME=value for each — see .env.example at the
repo root for the full list and each variable’s role.5
Deploy
Console (Next.js)
Deployed separately on Vercel (a natural fit for Next.js):NEXT_PUBLIC_HAKI_API_URL (the API’s Fly.io
URL), NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY / CLERK_SECRET_KEY (Clerk),
HAKI_CONSOLE_SERVICE_KEY (same value as on the API side — never
NEXT_PUBLIC_*, it must never reach the browser).

