fix(make): load root .env in docker compose targets#24
Merged
Conversation
The compose file lives in infrastructure/docker/, so Compose's default env-file
lookup resolves to that directory — not the repo root where .env is created.
Result: `make docker-up` rendered every ${VAR} blank (e.g. MEDIASOUP_ANNOUNCED_IP
empty, REDIS_PASSWORD silently falling back to the default). Pass --env-file .env
explicitly so the root .env is loaded for up/down/build.
https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs
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
Found while smoke-testing the stack:
make docker-updid not load the root.env.Because the compose file lives in
infrastructure/docker/, Docker Compose's default env-file lookup resolves relative to that directory, not the repo root where.envis created. As a result every${VAR}rendered blank — e.g.MEDIASOUP_ANNOUNCED_IP=""andREDIS_PASSWORDsilently falling back to the defaulttradingroom_redisinstead of the generated secret.Fix: pass
--env-file .envexplicitly on thedocker-up/docker-down/docker-buildtargets.Verified with
docker compose --env-file .env … config— secrets now interpolate correctly andconfig -qexits 0.Known follow-up (not in this PR)
infrastructure/docker/coturn/turnserver.confuses${TURN_EXTERNAL_IP}/${TURN_AUTH_SECRET}placeholders, but coturn does not expand shell variables in its config file — these need to be injected via the composecommand:(or a templating entrypoint). Flagged for a separate, boot-tested change.https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs
Generated by Claude Code