docs(env): stop presenting add-on credentials as required - #5556
Open
bettercalln1ck wants to merge 1 commit into
Open
bettercalln1ck wants to merge 1 commit into
bettercalln1ck wants to merge 1 commit into
Conversation
.env.example's REQUIRED block listed nine keys under a header promising
"docker compose will refuse to start" without them. Four of those nine —
LIVEKIT_API_KEY, LIVEKIT_API_SECRET, DIFY_SECRET_KEY and
OPENCODE_SERVER_PASSWORD — are absent from .env.schema.json "required", and a
scan of all 52 compose files finds no reference to any of them. A base install
starts perfectly well without them, so the header's claim was false and every
operator following this file invented four secrets they did not need.
They move to an OPTIONAL block naming the add-on each belongs to. The REQUIRED
block is now exactly the schema's six keys, five of which really are
${VAR:?...} in compose.
tests/test-env-example-required.sh keeps the two in sync and names the drift
when they diverge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4201.
.env.exampleopened with:and then listed nine keys.
.env.schema.jsonmarks six. I checked which source was right rather than assuming, by scanning all 52 compose files for each key:required[]WEBUI_SECRET${WEBUI_SECRET:?…}SEARXNG_SECRET${SEARXNG_SECRET:?…}N8N_USER${N8N_USER:?…}N8N_PASS${N8N_PASS:?…}OPENCLAW_TOKEN${OPENCLAW_TOKEN:?…}LITELLM_KEY${LITELLM_KEY:-…}(has fallbacks)LIVEKIT_API_KEYLIVEKIT_API_SECRETDIFY_SECRET_KEYOPENCODE_SERVER_PASSWORDSo the header's claim is false for those four: compose never reads them, and a base install comes up without them. The cost is not cosmetic — every operator following this file generated four secrets they did not need, for two add-ons that are not even bundled services (LiveKit is the optional voice add-on; Dify lives in
extensions/library/services/dify).The four move to an
OPTIONALblock, commented out, each naming the add-on it belongs to. TheREQUIREDblock is now exactly the schema's six keys, and its header says so instead of over-promising.AI Assistance
AI-assisted: an AI coding assistant drafted the patch and the regression test and ran the validation recorded below. I reviewed the diff, chose the validation, and am accountable for the change.
Release Lane
release/2.6.xmainStable hotfix reason:
Changed Surface
Risk And Validation
git diff --checkrelease/2.6.xCommands/results:
Operational Change Check
Notes For Reviewers
jq -r '.required[]'and prints both directions of the drift, so a future mismatch says which key moved rather than just failing. It also re-checks the four keys from this issue by name, and verifies every REQUIRED key is a real schema property rather than only an entry inrequired[]..env.schema.json, the macOS env generator, the extensions catalog and the Dify extension'ssetup.sh, so they remain valid settings — just not mandatory ones.LITELLM_KEYstays in REQUIRED because the schema marks it required, but it is the one key there that compose resolves with:-fallbacks rather than:?. I left the schema alone — deciding whether it truly belongs inrequired[]is a judgement about the LiteLLM auth model rather than a docs fix, and I did not want to smuggle it in here.ods/Makefileand theintegration-smokejob intest-linux.yml; the workflow entry is what gates, since no workflow runsmake test.jqis unavailable rather than failing.