Recipes for docker-compose and Kubernetes.
services:
torana:
build: https://github.com/abhinavcdev/torana.git
ports: ["8080:8080"]
volumes: ["./torana.toml:/etc/torana/torana.toml:ro"]
depends_on: [app]
app:
image: your-app Build the image from the repo Dockerfile, push it to your registry, and mount the config from a ConfigMap. Probes hit /healthz; graceful draining makes rolling restarts drop zero requests.
containers:
- name: app
image: your-app
- name: torana
image: your-registry/torana:latest
args: ["--config", "/etc/torana/torana.toml"]
ports:
- containerPort: 8080
volumeMounts:
- name: torana-config
mountPath: /etc/torana
livenessProbe:
httpGet: { path: /healthz, port: 9090 }
readinessProbe:
httpGet: { path: /healthz, port: 9090 }
volumes:
- name: torana-config
configMap:
name: torana-config metrics_addr as 0.0.0.0:9090 inside containers so probes and scrapers can reach it; keep it on 127.0.0.1 when the proxy shares a network namespace with its scraper.No container runtime needed: torana is a static binary, so a plain systemd unit is the whole story. Run it as a dedicated non-root user and grant CAP_NET_BIND_SERVICE instead of root when binding :443 directly.
[Service] User=torana Group=torana ExecStart=/usr/local/bin/torana --config /etc/torana/torana.toml ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure AmbientCapabilities=CAP_NET_BIND_SERVICE CapabilityBoundingSet=CAP_NET_BIND_SERVICE NoNewPrivileges=true ProtectSystem=strict ReadWritePaths=/var/lib/torana
A full working example — a real static frontend and a separate API backend, both proxied through one torana.toml, with systemd units for all three and a step-by-step guide from a $4/mo VPS to a browser-trusted certificate — lives in examples/full-stack-demo in the repo.
Next: benchmarking.