core CLI
draftcore is Pitwall’s server: the HTTP API, the web UI and the pipeline engine, in one binary. It reads its settings from the environment (Configuration), and its commands are run in its container, with the same environment.
Commands
Section titled “Commands”| Command | Does |
|---|---|
core |
Applies the database migrations, then serves |
core healthcheck |
Asks the server running in this container whether it is alive, on 127.0.0.1 and the port of PITWALL_HTTP_ADDR. The image’s healthcheck: it fails only when the server does not answer, not when the database is unreachable, since restarting would not bring it back |
core user reset <email> |
Prints a link that sets a new password for that person: valid for one hour, once. Using it signs them out everywhere. See Users and sign-in |
An unknown command exits with status 2.
core user reset prints the whole link when PITWALL_PUBLIC_URL is set, and only the path to open on your instance’s address otherwise. It never logs the link: whoever reads it can take the account.
core user reset someone@example.comThe health route
Section titled “The health route”GET /api/health needs no sign-in, and answers JSON:
| Field | Holds |
|---|---|
status |
ok, or degraded when the database cannot be reached; the answer is then 503 |
version |
The version the server was built as. dev when it was not stamped |
commit |
The commit it was built from. unknown when it was not stamped |
database |
ok or unreachable |
schema_version |
The database migration applied last |
A runner must be built from the same commit as the server: one that is not stops taking work and updates itself (Runners).