Skip to content

fix(make): load root .env in docker compose targets#24

Merged
billyribeiro-ux merged 1 commit into
mainfrom
claude/update-dependencies-stack-docs-nffxp
Jun 9, 2026
Merged

fix(make): load root .env in docker compose targets#24
billyribeiro-ux merged 1 commit into
mainfrom
claude/update-dependencies-stack-docs-nffxp

Conversation

@billyribeiro-ux

Copy link
Copy Markdown
Owner

Summary

Found while smoke-testing the stack: make docker-up did 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 .env is created. As a result every ${VAR} rendered blank — e.g. MEDIASOUP_ANNOUNCED_IP="" and REDIS_PASSWORD silently falling back to the default tradingroom_redis instead of the generated secret.

Fix: pass --env-file .env explicitly on the docker-up / docker-down / docker-build targets.

Verified with docker compose --env-file .env … config — secrets now interpolate correctly and config -q exits 0.

Known follow-up (not in this PR)

infrastructure/docker/coturn/turnserver.conf uses ${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 compose command: (or a templating entrypoint). Flagged for a separate, boot-tested change.

https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs


Generated by Claude Code

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
@billyribeiro-ux billyribeiro-ux merged commit 238405c into main Jun 9, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants