Production deployment
What changes between dev and production: process supervision, TLS, database backing, monitoring, and capacity planning.
Process supervision
Run under a process manager (systemd, supervisord, Kubernetes) so Soriku restarts on crash. Use a real ASGI server config: 2-4 Uvicorn workers behind a reverse proxy.
TLS
Terminate TLS at the reverse proxy (Caddy, nginx, Traefik). Soriku doesn't terminate TLS itself, by design: the proxy handles renewal.
Database
Local SQLite is fine for single-user. For multi-tenant production, point at Postgres via DATABASE_URL. Migrations run automatically on first start.
Monitoring
/api/healthfor liveness probes- Structured logs to stdout, scrape with your usual log pipeline
- Routing decisions in
data/routing_log.jsonl, ship to your data warehouse for analysis - Benchmark metrics from
benchmarks/results/capability_map.jsonto track drift
Capacity
Local model inference is RAM-bound. For each concurrent 7B model loaded, budget 5-6 GB. The router enforces RAM-aware loading and won't load two big models at once unless you have the memory.