Procfile (foreman / overmind)
The simplest approach for development. Usecordon wait to block until the proxy is ready:
cordon wait polls the health endpoint until it returns 200, then exits. Your application starts only after credentials are loaded and the proxy is accepting connections.
Background service
Install cordon as an OS-managed service that starts automatically:- macOS (launchd)
- Linux (systemd)
The service is installed as a launchd user agent. It starts on login and restarts on failure.
Named instances
Run multiple cordon instances with different configs:Health endpoint
The health endpoint is available atGET /health as soon as the proxy process starts:
| Status | Response | Meaning |
|---|---|---|
200 | {"status":"ok"} | Proxy is ready — secrets loaded, accepting connections |
503 | {"status":"starting"} | Proxy is starting — secrets not yet loaded |
503 immediately at process start (before secrets load). This is intentional — process supervisors can distinguish between “starting” (503) and “not running” (connection refused).
Startup sequence
The proxy starts in a strict order:- Parse and validate
cordon.yaml. Exit on invalid config. - Start health endpoint (serves
503 {"status":"starting"}). - Resolve all secrets from configured sources. Exit if any fail.
- If TLS enabled: generate or load CA keypair.
- Bind listener on configured address.
- Mark health endpoint ready (
200 {"status":"ok"}). - Begin accepting connections.