crabbox-coordinator
Recipe card from the charly-crabbox plugin (Images — the deployable catalog).
crabbox-coordinator
Section titled “crabbox-coordinator”Candy Properties
Section titled “Candy Properties”| Property | Value |
|---|---|
| Service | crabbox-coordinator (supervisord, priority 20) |
| Ports | 8080 (HTTP API + web portal; relayed) |
| Endpoints | GET /v1/health, GET /v1/ready |
| Runtime | Node.js ≥22.12 (layer-nodejs), built from the pinned upstream tag |
| Backing | opencharly postgresql candy (PostgreSQL 13+, pg-boss; schemas auto-created on startup) |
| Build | fetch pinned tag (annotated → dereferenced to its peeled commit) → npm ci --include=dev → build:node → npm prune --omit=dev (upstream Dockerfile recipe) |
Deploy env (operator / bed)
Section titled “Deploy env (operator / bed)”| Variable | Meaning |
|---|---|
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB |
database credentials (default postgres / crabbox); the start wrapper assembles DATABASE_URL |
CRABBOX_SHARED_TOKEN + CRABBOX_SHARED_OWNER |
shared-token automation auth (each caller runs crabbox login --url <origin> --token-stdin) |
CRABBOX_PUBLIC_URL |
canonical origin (default http://127.0.0.1:8080 for local) |
CRABBOX_ADMIN_TOKEN / CRABBOX_GITHUB_* / budget caps |
documented production knobs |
Local deployment
Section titled “Local deployment”crabbox login --url http://127.0.0.1:8080 --token-stdin # from the CLI candy in the same boxcrabbox doctor # coord check passes once readyThe coordinator creates the crabbox / crabbox_jobs schemas on startup.
Single replica (live bridge sockets are process-local; state is durable in
PostgreSQL). Cloudflare Workers remains the production alternative — see
upstream docs.
Verification
Section titled “Verification”Candy plan checks: the built runtime at the fixed path, the wrapper
installed, the supervised service running, and live /v1/health +
/v1/ready 200s via the http: verb. The e2e bed then logs the CLI into
the broker and drives broker-backed crabbox: verb methods
(leases/usage/events/logs) against it.
Cross-References
Section titled “Cross-References”/charly-tools:crabbox— the CLI candy (layer-crabbox)./charly-check:crabbox— thecrabbox:check verb (plugin-crabbox)./charly-infrastructure:postgresql— the backing database candy.- Upstream Crabbox coordinator docs.