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.
Run it
Section titled “Run it”cd deploy/warpracp .env.example .env # set WARPRA_API_KEYS, POSTGRES_PASSWORD and the model / provider keysdocker compose up -d --buildThe .env file:
# 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-0001POSTGRES_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:echoOPENAI_API_KEY=ANTHROPIC_API_KEY=WARPRA_HOST_PORT=8123Never commit .env.
Connect a client
Section titled “Connect a client”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.
What the compose file sets
Section titled “What the compose file sets”WARPRA_HOST=0.0.0.0,WARPRA_PORT=8000,WARPRA_LOG_FORMAT=json,WARPRA_CONFIG=/app/config/warpra.json.DATABASE_URIpointing at thedbservice, so the server uses Postgres.- A health check with
curlagainst/ok. stop_grace_period: 45s, aboveWARPRA_SHUTDOWN_GRACE_SECONDS(default 30), so in-flight runs can drain ondocker stop.- A read-only root filesystem, all capabilities dropped and
no-new-privileges. - Ports published on
127.0.0.1only.
Production notes
Section titled “Production notes”- TLS: put a TLS reverse proxy in front for public access.
- Replicas: with Postgres you can run several
warpra-serverreplicas against one database. Each needs a uniqueWARPRA_REPLICA_ID; the default is unique. A replica withWARPRA_N_JOBS_PER_WORKER=0only 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 migrateto apply them separately, and setWARPRA_MIGRATE=skipon the servers. - Code graphs: the image contains no code graphs. Build your own binary on the
warpra-serverlibrary, with your graphs registered throughServer::builder().graph(..).
Verified
Section titled “Verified”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.