Wire env vars documented in .env.example through to compose containers - #284
Merged
Conversation
LICENSE_FETCH_ENABLED, SEARCH_RATE_LIMIT, INTAKE_REQUESTS_ENABLED, EXTERNAL_PACKAGE_LOOKUP_ENABLED, and its two rate limits were all declared in .env.example but never listed in either compose file's x-backend-env anchor, so setting them in .env had no effect on the running container. Most notably, an air-gapped deployment following the docs to turn off EXTERNAL_PACKAGE_LOOKUP_ENABLED would not actually have turned it off. Defaults match core/config.py and .env.example exactly, so an unset .env changes nothing for an existing deployment.
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
LICENSE_FETCH_ENABLED,SEARCH_RATE_LIMIT,INTAKE_REQUESTS_ENABLED,EXTERNAL_PACKAGE_LOOKUP_ENABLED,EXTERNAL_PACKAGE_LOOKUP_RATE_LIMIT, andEXTERNAL_ADVISORY_LOOKUP_RATE_LIMITwere all declared in.env.examplebut never listed in either compose file'sx-backend-envanchor, so setting any of them in.envhad no effect on the running container -- compose only passes through a var explicitly named in the anchor.EXTERNAL_PACKAGE_LOOKUP_ENABLED=falsewould not actually have disabled the outbound deps.dev calls.docker-compose.dev.ymlalready hadINTAKE_REQUESTS_ENABLEDwired (added for that feature's own e2e test); this folds it into the same consolidated block and adds it todocker-compose.yml(production), which was missing it entirely.core/config.pyand.env.exampleexactly, so an unset.envvalue changes nothing for an existing deployment -- purely additive.Test plan
docker-compose -f docker-compose.dev.yml config -qvalidatespython3 -c "import yaml; yaml.safe_load(open('docker-compose.yml'))"validates (production compose file)node tools/em-dash/lint.mjs --base origin/mainclean