Configuration¶
Targetlog reads environment variables only.
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
required | PostgreSQL URL, e.g. postgres://user:pass@host:5432/db?sslmode=require |
TARGETLOG_LISTEN |
:8080 |
listen address of the app |
TARGETLOG_METRICS_LISTEN |
:9090 |
Prometheus /metrics on a separate listener, so it is never reachable through the ingress. Empty: no metrics |
TARGETLOG_LOG_LEVEL |
info |
debug, info, warn, error; JSON lines on stderr |
TARGETLOG_TRUST_PROXY |
false |
take the client address from X-Forwarded-For (only behind your own ingress); used for login rate limits |
TARGETLOG_ADMIN_TOKEN |
empty | token for the admin panel, at least 32 characters. Empty: the admin panel is disabled |
Generate the admin token with openssl rand -base64 32 and keep it in a secret store.
Stateless
Sessions, login rate limits, maintenance mode, print jobs and realtime events all live in PostgreSQL. Any number of replicas can run behind a load balancer without sticky sessions.