Live portal: React + dockview multi-stream viewer behind Authentik; MediaMTX HLS/WebRTC/API re-enabled; is-live Discord hook
live/: every active stream opens as a dockable window (WHEP, HLS fallback), audio follows the focused window, per-window mute/volume, pinning. Caddy live.HOST block with forward-auth proxies /api /webrtc /hls to MediaMTX on loopback and serves /srv/live. WebRTC media on 8189 (firewall). configure.py asks the live hostname and an optional Discord webhook; MediaMTX -ffmpeg image runs the runOnReady hook. deployLive.sh builds and ships dist/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -31,11 +31,13 @@ GIT_CUR=$(python3 -c 'import configure as c; print(c.read_hosts().get("git",""))
|
||||
GIT=$(ask "Gitea hostname" "${GIT_CUR:-git.$BASE}")
|
||||
BOT_CUR=$(python3 -c 'import configure as c; print(c.read_hosts().get("bot",""))')
|
||||
BOT=$(ask "Bot web UI hostname" "${BOT_CUR:-bot.$BASE}")
|
||||
LIVE_CUR=$(python3 -c 'import configure as c; print(c.read_hosts().get("live",""))')
|
||||
LIVE=$(ask "Live portal hostname" "${LIVE_CUR:-live.$BASE}")
|
||||
|
||||
# ---- DNS sanity ----------------------------------------------------------------------------------
|
||||
say "DNS check"
|
||||
MAIN_IP=$(ip_of "$MAIN"); ok=1
|
||||
for h in "$AUTH" "$WATCH" "$GIT" "$BOT"; do
|
||||
for h in "$AUTH" "$WATCH" "$GIT" "$BOT" "$LIVE"; do
|
||||
ip=$(ip_of "$h")
|
||||
if [[ -z $ip ]]; then echo " $h: does not resolve yet"; ok=0
|
||||
elif [[ $ip != "$MAIN_IP" ]]; then echo " $h -> $ip (main is $MAIN_IP) — points somewhere else"; ok=0
|
||||
@@ -48,7 +50,7 @@ fi
|
||||
|
||||
# ---- write configs, .env, start containers -----------------------------------------------------
|
||||
say "Applying (configure.py --hosts)"
|
||||
VG_DRY=$DRY python3 configure.py --hosts "$AUTH" "$WATCH" "$GIT" "$BOT" | sed -n '/== writing/,$p' | grep -vE '^ (techy|diceofire|[a-z0-9_-]+) password' || true
|
||||
VG_DRY=$DRY python3 configure.py --hosts "$AUTH" "$WATCH" "$GIT" "$BOT" "$LIVE" | sed -n '/== writing/,$p' | grep -vE '^ (techy|diceofire|[a-z0-9_-]+) password' || true
|
||||
[[ $DRY == 1 ]] && { echo "(dry run: skipping container wait)"; exit 0; }
|
||||
|
||||
# ---- wait ---------------------------------------------------------------------------------------
|
||||
@@ -148,6 +150,12 @@ PHASE 3 — Jellyfin (direct play only on this CPU)
|
||||
Custom CSS: paste jellyfin/branding.css
|
||||
-> Save; reload https://$WATCH/
|
||||
|
||||
LIVE PORTAL (https://$LIVE/) — same Authentik forward-auth gate as the bot host:
|
||||
Authentik -> Applications -> Create with provider -> Proxy Provider (forward auth, single application),
|
||||
External host https://$LIVE -> add to the embedded outpost -> group policy.
|
||||
Deploy the page: on the dev box `cd live && npm run build`, then ./deployLive.sh (scp dist -> /srv/live).
|
||||
WebRTC viewers need UDP/TCP 8189 open (firewall rule included).
|
||||
|
||||
BOT WEB UI (https://$BOT/) — Authentik forward-auth gate, create once:
|
||||
Authentik -> Applications -> Create with provider -> Proxy Provider
|
||||
mode "Forward auth (single application)", External host https://$BOT
|
||||
|
||||
Reference in New Issue
Block a user