Self-hoster setup + env-var reference in README; CLAUDE.md convention to keep it current #114
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The repo's self-hoster-facing setup is scattered across
README.md,CLAUDE.md,Dockerfile,docs/ci.md,docs/oidc-self-hoster-guide.md, and the ADR set. A self-hoster reading the README today doesn't see:DATABASE_URLdefaults tosqlite:./data/carol.dband accepts Postgres URLs.CAROL_STORAGE_ROOTcontrols blob storage (added under #21 / ADR-0018).APP_URLis needed under a reverse proxy (added by #103).REGISTRATION_POLICYacceptsopen | invite | admin-approvalbut onlyopenis implemented today.OIDC_<NAME>_*provider configuration goes in env, not a config file (ADR-0017).PORT/HOSTNAMEand ships withNEXT_TELEMETRY_DISABLED=1.A quick grep over the source today (
process.env.[A-Z_]+) confirms the user-facing surface is:APP_URL,CAROL_STORAGE_ROOT,DATABASE_URL,REGISTRATION_POLICY, plus the DockerfileENVdefaults and the dynamicOIDC_<NAME>_*set. None of those names appear in the README.Without a single source of truth, every new feature ticket either re-documents the same info or quietly relies on the contributor reading the source — exactly the failure mode the env-var sprawl creates.
Scope
README.mdgains:process.env.*inlib/,app/,db/,proxy.ts,instrumentation.ts, and the Dockerfile.podman run/ compose with the data-directory volume mount called out and the minimum env vars to start.npm installflow stays, plus a note on overriding env vars locally (shell export or.env.local).CLAUDE.mdgains a convention bullet (under Conventions — these are load-bearing) saying: every PR that adds, removes, or changes a self-hoster-facing env var must update the README's Configuration table in the same commit. No user-facing env var lives only in the source. CI-runner / test-only env vars (BASE_REF,FORGEJO_*,GITHUB_*,PR_NUMBER,TEST_POSTGRES_URL,NEXT_RUNTIME) are explicitly out — they belong with the workflow or test that uses them.CLAUDE.md's Stack defaults and Working in this repo sections currently restate some of this. After the README lands as the source of truth, those bullets should link to the README rather than repeat the values.Acceptance criteria
README.mdhas a Configuration section listing every self-hoster-facing env var with default + brief description, grouped by concern.README.mdhas a self-hosted deployment snippet that names the data-directory volume and shows the minimum env vars to start the container.CLAUDE.mdadds the convention bullet that ties future env-var changes to README updates.grep -rohE 'process\.env\.[A-Z_]+' lib/ app/ db/ proxy.ts instrumentation.ts | sort -ushows no name that isn't either in the README table or explicitly marked as internal in the audit notes inside this PR's description.README.mdandCLAUDE.md/docs/*— the deeper docs link to the README's table rather than restate it.Out of scope
process.env.*and fails if anything isn't in the README table). Worth a follow-up ticket if drift turns out to be real; the convention bullet is the soft enforcement first..env.examplefile. Useful but follow-up — the README table is the source of truth first; a checked-in example file is the second-order convenience.docs/ci.md,docs/oidc-self-hoster-guide.md). Those stay as references; the README is the "where do I start?" entry point and should link into them, not absorb them.