Deployment
PlainQ is a single binary, so deployment is mostly about where you run it and how you persist its database.
Single binary
Section titled “Single binary”The simplest deployment: copy ./plainq to a host and run it. With SQLite, the
entire state lives in one file.
./plainq serve \ -storage.path=/var/lib/plainq/plainq.db \ -auth.jwt.secret="$(openssl rand -hex 32)"Pair it with Litestream to continuously replicate the SQLite file to object storage for cheap durability.
Docker
Section titled “Docker”docker run --rm -p 8080:8080 -p 8081:8081 -v plainq-data:/data \ plainq:dev serve -storage.path=/data/plainq.db \ -auth.jwt.secret="$(openssl rand -hex 32)"Mount a volume at /data and point -storage.path at it for a durable
database.
Kubernetes (Helm)
Section titled “Kubernetes (Helm)”The chart in deploy/helm/plainq deploys:
- a StatefulSet + PVC for the SQLite backend, or
- a Deployment + HPA when
storage.driver=postgres.
helm install plainq deploy/helm/plainq \ --set auth.jwtSecret="$(openssl rand -hex 32)"The JWT secret is sourced from a Kubernetes Secret. See the chart README in the repository for the full set of values.
Network exposure
Section titled “Network exposure”Health & metrics
Section titled “Health & metrics”GET /health— liveness/readiness probe (configurable via-health.route).GET /metrics— Prometheus-style metrics (configurable via-metrics.route).
Wire these into your orchestrator’s probes and your monitoring stack.