Skip to content

fix(turn): inject coturn secrets via compose + add stack smoke-test workflow#25

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

fix(turn): inject coturn secrets via compose + add stack smoke-test workflow#25
billyribeiro-ux merged 1 commit into
mainfrom
claude/update-dependencies-stack-docs-nffxp

Conversation

@billyribeiro-ux

Copy link
Copy Markdown
Owner

Summary

Two changes that came out of smoke-testing the stack.

1. coturn secret injection (production breaker)

coturn does not expand ${VARS} inside turnserver.conf, so external-ip=${TURN_EXTERNAL_IP} and static-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.

  • Move external-ip and static-auth-secret out of the static conf and inject them as turnserver CLI flags via the compose command (Compose expands ${...} from .env at render time).
  • Drop the unused literal user=…${TURN_PASSWORD} line in favor of the REST / use-auth-secret path.
  • Verified the rendered command shows the real IP + secret; compose config -q exits 0; no ${} left in active conf lines.

2. Stack smoke-test workflow

.github/workflows/smoke-test.yml generates ephemeral secrets, then actually boots Redis + coturn + the mediasoup SFU on a GitHub-hosted runner and asserts:

  • SFU /health responds
  • Redis answers PONG with the generated password
  • coturn is listening on udp/3478

This 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_URL and are covered by ci-cd.yml.

https://claude.ai/code/session_01AMiTSxG8rB8FU8QgJ3Fnhs


Generated by Claude Code

…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
@billyribeiro-ux billyribeiro-ux merged commit 0d73675 into main Jun 9, 2026
1 check failed
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