Skip to content

crabbox-coordinator

Recipe card from the charly-crabbox plugin (Images — the deployable catalog).

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=devbuild:nodenpm prune --omit=dev (upstream Dockerfile recipe)
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
Terminal window
crabbox login --url http://127.0.0.1:8080 --token-stdin # from the CLI candy in the same box
crabbox doctor # coord check passes once ready

The 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.

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.