docs: correct .env.example and add navigation to the operator docs - #44
Merged
Merged
Conversation
`.env.example` carried several claims that do not match the code: - macOS-only engines were described as "rejected here". Nothing validates `VOCAGATEWAY_ENGINE` against the host: `engine_runs_here` gates only the WebUI and `PUT /v1/admin/config`. `VOCAGATEWAY_ENGINE=vocamac` in a container starts fine and leaves `/health/ready` at 503. - `VOCAGATEWAY_PORT` was grouped with `BIND_HOST` as "only meaningful under network_mode: host". It is also the container-side target of the published mapping, so it is safe to change on bridge. - `VOCAGATEWAY_IMAGE` was described as running a prebuilt image. Compose still builds and applies the tag; pulling needs `pull` + `up --no-build`. The native/cuda/vulkan services ignore the variable entirely. - The header claimed direnv is configured not to export from here. No `.envrc` is shipped; what keeps `.env` out of a native run is the justfile's `dotenv-load := false`. It was also missing the two things that cost the most setup time: the empty `VOCAGATEWAY_TOKEN` placeholder passes `docker compose config` and yields a gateway with an unknowable generated secret, and variables `compose.yaml` does not name (`DATA_DIR`, `MODELS_DIR`, `CONFIG_FILE`, the macOS engine paths) are read from `.env` and silently dropped. Both verified against `docker compose config`. The file is now in seven numbered sections. Navigation: - README gains "Deploy in three steps" and a Contents list; the two product-family tables move below the deployment material so the quick starts are what a new reader meets first. - New `docs/README.md` index; `deployment.md`, `configuration.md`, and `troubleshooting.md` gain contents lists (troubleshooting's is grouped by symptom). - `configuration.md`'s env table gains an "In `.env`?" column recording what Compose actually forwards. Also corrects the vocaphone submodule path to `gateway/` per AGENTS.md, and a stale `server/.env` reference in a justfile comment.
There was a problem hiding this comment.
Mr-Sunglasses has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
✅ Deploy Preview for voca-gateway canceled.
|
There was a problem hiding this comment.
Mr-Sunglasses has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
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
What changed?
.env.exampleis rewritten into seven numbered sections withits inaccurate claims corrected, and the operator docs gain the navigation
needed to find a deployment path without reading 900 lines top to bottom.
Why is it needed? Four statements in
.env.exampledid not match the code,and the two failure modes that cost the most setup time were undocumented.
Claims corrected, each checked against
app/config.py,app/engines.py,compose.yaml, andDockerfile:VOCAGATEWAY_ENGINEagainst the host.engine_runs_hereis reached only fromEngineFactory.validate(), i.e. the WebUI andPUT /v1/admin/config.VOCAGATEWAY_ENGINE=vocamacin a container starts fine and leaves/health/readyat503.BIND_HOSTandPORTare "only meaningful undernetwork_mode: host"BIND_HOSTonly.VOCAGATEWAY_PORTis also the container-side target of the published mapping, so it is safe to change on the default bridge network.VOCAGATEWAY_IMAGEruns "a prebuilt multi-architecture image"up --buildstill builds locally and applies the tag; pulling needsdocker compose pull+up --no-build. Thenative/cuda/vulkanservices carry fixed tags and ignore it..envrcis shipped (it is gitignored). What keeps.envout of a native run is the justfile'sdotenv-load := false.Two omissions added, both reproduced with
docker compose config:VOCAGATEWAY_TOKENpassesdocker compose configon the shippedplaceholder.
Settings.from_env()then falls through to_generate_token(),which cannot write over the existing secret file, so the gateway runs on a
secret it never prints —
/health/livegreen, every authenticated request401.compose.yamlforwards only the keys it names, soVOCAGATEWAY_DATA_DIR,MODELS_DIR,CONFIG_FILE,TOKEN_FILE, and the macOS engine paths are readfrom
.envand dropped. Confirmed absent from the resolved config. TheVOCAGATEWAY_GIT_COMMIT*warning that previously lived only in the README isnow here too.
Navigation:
The Voca familyandConsumersmove below the deployment material so the quick startsare what a new reader meets first. No heading is renamed, so existing anchors
still resolve.
docs/README.mdindex, linked from the README andAGENTS.md.deployment.md,configuration.md, andtroubleshooting.md— the last grouped by symptom rather than a flat wall of20 headings.
configuration.md's environment table gains an In.env? columnrecording what Compose forwards, pins, or ignores.
Also corrects the vocaphone submodule path to
gateway/(perAGENTS.md, whichflags
server/as wrong) and the matching staleserver/.envreference in ajustfile comment.
Verification
(checked programmatically, including the moved README sections)
.env.examplestill works as a template: copied to a file, tokenappended,
docker compose config --quietpassesdocker compose config— repeated keysresolve last-wins; unlisted
VOCAGATEWAY_*keys never reach the servicejust --listparses the edited justfilejust test— not run: no Python, Dockerfile, or lockfile changed, soquality.ymlandcontainer.ymlskip this PR by path filterPrivacy and security
The security posture is documented more sharply, not relaxed: the empty
token and the silently-ignored
.envkeys are now called out where anoperator will see them.