Skip to content

Deployment

The repository ships a Docker Compose setup in deploy/warpra/: warpra-server plus Postgres (the pgvector/pgvector:pg16 image, so a store index can use pgvector).

File Purpose
deploy/warpra/compose.yaml The warpra and db services
deploy/warpra/warpra.json Server config, mounted read-only at /app/config/warpra.json
deploy/warpra/.env.example Template for .env

The image is built from the shared deploy/Dockerfile: a multi-stage Rust release build and a slim, non-root Debian runtime with curl and tini, so docker stop drains cleanly. Containers run as uid 10001.

cd deploy/warpra
cp .env.example .env # set WARPRA_API_KEYS, POSTGRES_PASSWORD and the model / provider keys
docker compose up -d --build

The .env file:

.env.example
# API keys accepted by the server: comma-separated, each at least 24 characters, optionally principal=key.
# Clients send one as `x-api-key` or `Authorization: Bearer`.
WARPRA_API_KEYS=alice=change-me-to-a-long-random-key-0001
POSTGRES_PASSWORD=change-me
# Model of the example agent in warpra.json. `fake:echo` runs offline; for a real model use e.g.
# openai:gpt-4o-mini (needs OPENAI_API_KEY) or anthropic:claude-sonnet-4-5 (needs ANTHROPIC_API_KEY).
AGENT_MODEL=fake:echo
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
WARPRA_HOST_PORT=8123

Never commit .env.

The server listens on port 8000 in the container. Compose publishes it on 127.0.0.1:8123 (WARPRA_HOST_PORT):

from langgraph_sdk import get_client
client = get_client(url="http://127.0.0.1:8123", api_key="<one of WARPRA_API_KEYS>")

The config serves one graph, agent: a declarative ReAct agent whose model comes from AGENT_MODEL.

  • WARPRA_HOST=0.0.0.0, WARPRA_PORT=8000, WARPRA_LOG_FORMAT=json, WARPRA_CONFIG=/app/config/warpra.json.
  • DATABASE_URI pointing at the db service, so the server uses Postgres.
  • A health check with curl against /ok.
  • stop_grace_period: 45s, above WARPRA_SHUTDOWN_GRACE_SECONDS (default 30), so in-flight runs can drain on docker stop.
  • A read-only root filesystem, all capabilities dropped and no-new-privileges.
  • Ports published on 127.0.0.1 only.
  • TLS: put a TLS reverse proxy in front for public access.
  • Replicas: with Postgres you can run several warpra-server replicas against one database. Each needs a unique WARPRA_REPLICA_ID; the default is unique. A replica with WARPRA_N_JOBS_PER_WORKER=0 only serves the API.
  • Dedicated database: do not share the database with other tools. Use a dedicated database, or a dedicated Postgres schema through the connection string.
  • Migrations: applied at startup by default. Run warpra-server migrate to apply them separately, and set WARPRA_MIGRATE=skip on the servers.
  • Code graphs: the image contains no code graphs. Build your own binary on the warpra-server library, with your graphs registered through Server::builder().graph(..).

The image was checked with Compose and Postgres: the Python client (assistants, wait, stream, state, history, store) and RemoteGraph against the container; a wrong key rejected; data surviving a restart; SIGTERM drain.

Warpra is open source under Apache-2.0. Made by Liceron.