Docker: stop telling operators to turn off the bootstrap that upgrades them
Every deployment file advised setting PB_BOOTSTRAP=false "once the database
is established". That was harmless while the schema was static. It stopped
being harmless in 9bd5c52, which moved the plugin settings into a new
app_settings collection: a stack upgraded with the bootstrap off never gets
that collection, and a missing collection is deliberately read as "the
database is not ready" rather than "no plugins configured" - so the plugin
panel answers 503 indefinitely and the background retry spins forever.
Fixing the advice rather than the reading: treating a missing collection as
empty would let the first save write a fresh document over settings the
server had simply failed to find, which is the failure this whole line of
work exists to prevent.
So all four compose files, all four .env examples, both stack READMEs and
the AIO Dockerfile now say to leave the bootstrap on, including across
upgrades, and name the symptom an operator would otherwise have to guess
at. Turning it off is still supported, but framed as something to do only
for a database known to match the running release.
Compose files still parse as YAML; go build, go vet and go test ./... pass
(untouched by this commit - it is comments and docs only). Note that this
is guidance, not a guard: an operator who sets PB_BOOTSTRAP=false anyway
still ends up in the same place, and the server would have to re-run the
bootstrap when it finds the collection missing to make that impossible.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9bd5c523c4
commit
01a8fecf40
@@ -62,8 +62,14 @@ Identical to the multi-container stack, and idempotent:
|
||||
1. PocketBase upserts its superuser from `PB_ADMIN_EMAIL` / `PB_ADMIN_PASSWORD`.
|
||||
2. The API Server waits for PocketBase to report healthy, then creates any
|
||||
missing collections, reconciles existing ones, and creates the first app
|
||||
`superadmin` from `DRIVERVAULT_SUPERADMIN_EMAIL` / `_PASSWORD`. Set
|
||||
`PB_BOOTSTRAP=false` to skip once the database is established.
|
||||
`superadmin` from `DRIVERVAULT_SUPERADMIN_EMAIL` / `_PASSWORD`.
|
||||
|
||||
> Leave `PB_BOOTSTRAP` at `true`, including across upgrades. A release can add a
|
||||
> collection the server needs — `app_settings`, which holds the plugin settings,
|
||||
> is one — and a stack that skipped the bootstrap never gets it. The plugin panel
|
||||
> then answers `503` indefinitely, because a missing collection is read as "the
|
||||
> database is not ready yet", never as "no plugins configured". Turn it off only
|
||||
> for a database you know already matches the release you are running.
|
||||
|
||||
## Volumes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user