infinicon

devops/deployment.md

Deployment

npm (recommended for most users)

Requires Bun:

npx @infinicon/server

Set PORT, DATABASE_URL, and INFINICON_API_KEY as needed. See packages/server/README.md.

Docker

docker build -t infinicon-server .
docker run -p 8787:8787 -e DATABASE_URL="postgres://..." infinicon-server

Reference server from source (Bun)

bun install
bun run dev

The server binds to 0.0.0.0:$PORT (default 8787).

Environment variables

VariableRequiredDescription
PORTnoHTTP port (default 8787)
HOSTnoBind address (default 0.0.0.0)
DATABASE_URLnoPostgres connection string; omit for in-memory dev storage
INFINICON_API_KEYnoWhen set, all /v0/* routes require Authorization: Bearer <key>
JOB_POLL_MSnoBackground job runner interval (default 2000)

Storage modes

  • In-memory (default): single-process, ephemeral — fine for local dev and CI.
  • Postgres (DATABASE_URL set): durable JSONB-backed adapters with lexical index table. Render Postgres or any managed Postgres works.

Ephemeral filesystem on Render means local disk is not durable. Use Postgres for production persistence.

Health and metrics

  • GET /health — service status, plugin stats, storage mode, counters
  • GET /metrics — JSON runtime counters (ingest/query/tombstone/jobs)

Render

Deploy to Render

See render.yaml at repo root. Web service + optional managed Postgres.

Build: bun install
Start: bun run src/server.ts

Verification before deploy

bun run verify