fix(compose): dev fallback JWT secrets so docker compose up works without a .env#1
Merged
Conversation
…ithout a .env
Running `docker compose up` directly (instead of via `make`, which injects them)
left JWT_ACCESS_SECRET/JWT_REFRESH_SECRET blank, so the backend booted healthy
but auth (register/login) 500'd. Add dev-only fallback values in the override
via ${VAR:-default}.
Scoped to dev only: CI/e2e/prod load the base compose WITHOUT this override
(see Makefile E2E_FILES/TEST_FILES), where these vars still have no default and
a real secret must be supplied — prod secret hygiene is unchanged.
Also documents (comment only) that Compose < 2.24 cannot drop the base 8080 port
mapping that dev inherits; set FRONTEND_PORT in a local .env if 8080 is taken.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds dev-only fallback values for
JWT_ACCESS_SECRET/JWT_REFRESH_SECRETindocker-compose.override.ymlvia${VAR:-default}.Why
Running
docker compose updirectly (rather than viamake, which injects the secrets) left both JWT vars blank. The backend booted healthy, but any auth call (register/login) failed because the tokens couldn't be signed — so the stack looked up but was unusable, and seeding/login silently 500'd.Scope & safety
docker compose up. CI, e2e, and prod load the base compose without this override (seeMakefileE2E_FILES/TEST_FILES), where these vars still have no default and a real secret must be supplied. Prod secret hygiene is unchanged..env.Verification
A clean
docker compose upwith no inline secrets boots andPOST /api/v1/auth/registerreturns 201 — confirming the fallback resolves end-to-end.Note (not in this PR)
Compose < 2.24 can't drop the base
8080port mapping the dev frontend inherits, so on a host where8080is occupied, setFRONTEND_PORTin a local.env. Documented as a comment in the override.🤖 Generated with Claude Code