fix(turn): inject coturn secrets via compose + add stack smoke-test workflow#25
Merged
Merged
Conversation
…smoke test
coturn does not expand ${VARS} inside turnserver.conf, so external-ip and
static-auth-secret were being read as literal strings — breaking TURN relay auth.
Move those two values out of the static conf and inject them as turnserver CLI
flags via the compose `command` (Compose expands ${...} from .env at render time),
and drop the unused literal `user=` line in favor of the REST/use-auth-secret path.
Add .github/workflows/smoke-test.yml: generates ephemeral secrets, then actually
boots Redis + coturn + the mediasoup SFU on a GitHub-hosted runner (which has image
access) and asserts SFU /health, Redis auth, and coturn UDP/3478 — the boot that
can't run in the sandboxed dev container due to Docker Hub pull limits.
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
Two changes that came out of smoke-testing the stack.
1. coturn secret injection (production breaker)
coturn does not expand
${VARS}insideturnserver.conf, soexternal-ip=${TURN_EXTERNAL_IP}andstatic-auth-secret=${TURN_AUTH_SECRET}were being read as the literal strings — meaning the TURN shared secret never matched the one the app uses to mint REST credentials, so the TURN relay fallback would fail auth.external-ipandstatic-auth-secretout of the static conf and inject them asturnserverCLI flags via the composecommand(Compose expands${...}from.envat render time).user=…${TURN_PASSWORD}line in favor of the REST /use-auth-secretpath.compose config -qexits 0; no${}left in active conf lines.2. Stack smoke-test workflow
.github/workflows/smoke-test.ymlgenerates ephemeral secrets, then actually boots Redis + coturn + the mediasoup SFU on a GitHub-hosted runner and asserts:/healthrespondsPONGwith the generated passwordudp/3478This is the real boot that can't run in the sandboxed dev container (Docker Hub anonymous pull limits). It deliberately skips the DB-backed services (api-rs, signaling, pgbouncer), which need a real
DATABASE_URLand are covered byci-cd.yml.https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs
Generated by Claude Code