restreamer-ui-v2/docker-compose.yml
Cesar Mendivil bc97ee0a68 feat(nginx): add Docker setup for Nginx with templated configuration
- Create Dockerfile for Nginx with envsubst for dynamic configuration.
- Add djmaster.conf.template for Nginx configuration with upstream services.
- Implement docker-entrypoint.sh to substitute environment variables in the Nginx config.
- Add README.md in nginx-examples for guidance on using the Nginx template.
- Include djmaster.conf.template in nginx-examples for local setup.
- Introduce utility functions for fetching YouTube video snippets and titles.
2026-03-18 10:35:28 -07:00

90 lines
5.1 KiB
YAML

services:
restreamer-ui:
# Build image from repository so `docker compose up --build` works on another host
build:
context: .
dockerfile: Dockerfile
image: restreamer-ui-v2:latest
container_name: restreamer-ui
restart: unless-stopped
ports:
- "3000:3000"
- "3002:3002"
environment:
# ── Restreamer Core ────────────────────────────────────────────────────
# URL del Core al que se conecta la UI. Dejar vacío para auto-detectar
# desde window.location (cuando la UI está embebida dentro del Core).
CORE_ADDRESS: "https://restreamer.nextream.sytes.net"
# ── yt-dlp / stream extractor ──────────────────────────────────────────
# Host:puerto del servicio extractor (usado por Caddy para reverse_proxy).
# Caddy expondrá el servicio en http://localhost:3000/yt-stream/
#YTDLP_HOST: "100.73.244.28:8080"
YTDLP_HOST: "192.168.1.20:8282"
# YTDLP_URL: URL completa del servicio yt-dlp vista desde el NAVEGADOR.
# Dejar vacío → la UI usará /yt-stream/ (Caddy proxy, mismo origen = sin CORS).
YTDLP_URL: ""
# Host:puerto del servicio titles (usado por Caddy para /yt-titles proxy)
YTDLP_TITLES_HOST: "100.73.244.28:8080"
# YouTube Data API key (used by the UI to fetch title/description)
YOUTUBE_API_KEY: "AIzaSyABiXKk-1tcoR0wQnccZfutBDi0ijTr0Ko"
# ── Facebook OAuth2 microserver ────────────────────────────────────────
# Dejar vacío → Caddy proxy /fb-server → localhost:3002 (sin CORS)
FB_SERVER_URL: ""
# URL EXACTA registrada en Facebook como "Valid OAuth Redirect URI"
# Debe coincidir con lo que tienes en developers.facebook.com
FB_OAUTH_CALLBACK_URL: "https://djmaster.nextream.sytes.net/oauth/facebook/callback.htm"
# URL EXACTA registrada en Google Console como "Authorized redirect URI"
# Debe coincidir con lo que tienes en console.cloud.google.com
YT_OAUTH_CALLBACK_URL: "https://djmaster.nextream.sytes.net/oauth2callback"
# Clave de cifrado para tokens almacenados (cámbiala en producción)
FB_ENCRYPTION_SECRET: "restreamer-ui-fb-secret-key-32x!"
# ── WebRTC Relay → FFmpeg → RTMP ──────────────────────────────────────
# Host del Restreamer Core para el relay RTMP (en Docker = nombre del servicio)
# Si la UI corre junto al Core en la misma red Docker, usar el service name.
# Si corre independiente, apuntar a la IP/hostname del Core.
RTMP_HOST: "restreamer.nextream.sytes.net"
RTMP_PORT: "1935"
RTMP_APP: "live"
# ── LiveKit ────────────────────────────────────────────────────────────
# Credenciales del servidor LiveKit (self-hosted o LiveKit Cloud)
LIVEKIT_API_KEY: "APIBTqTGxf9htMK"
LIVEKIT_API_SECRET: "0dOHWPffwneaPg7OYpe4PeAes21zLJfeYJB9cKzSTtXW"
LIVEKIT_WS_URL: "wss://livekit-server.nextream.sytes.net"
# ── Servidor egress (WHIP ingest + WHEP relay) ─────────────────────────────
# URL del servidor egress / dominio del UI.
# El Core usa esta URL para WHEP pull: <WHIP_SERVER_URL>/whep/rooms/<channelId>
# Caddy proxea /whep/* → egress y /w/* → livekit-ingress, todo bajo el mismo dominio.
WHIP_SERVER_URL: "https://djmaster.nextream.sytes.net"
# ── LiveKit Ingress WHIP (proxy interno) ──────────────────────────────────
# Host:puerto interno del servicio livekit-ingress.
# Caddy hace proxy /w/* → este host (OBS nunca lo ve directamente).
LIVEKIT_INGRESS_HOST: "192.168.1.20:8088"
LIVEKIT_INGRESS_INTERNAL_URL: "http://192.168.1.20:8088"
# URL pública del UI. Se usa para construir la WHIP URL que ve OBS.
# Dejar vacío = se auto-detecta del Host header de cada request.
UI_BASE_URL: "https://djmaster.nextream.sytes.net"
# ── Egress server WHEP (proxy interno) ──────────────────────────────────
# Caddy hace proxy /whep/* → este host.
# Core input: https://djmaster.nextream.sytes.net/whep/rooms/<channelId>
EGRESS_HOST: "llmchats-whep.zuqtxy.easypanel.host"
volumes:
# Persistencia de tokens OAuth2 (Facebook, YouTube, etc.)
- restreamer-ui-fb-data:/data/fb
# devices:
# - "/dev/video1:/dev/video1" # Descomentar si hay cámara USB disponible
# Nginx service removed — using external reverse proxy instead
volumes:
restreamer-ui-fb-data:
driver: local
# If you previously used caddy, you can remove caddy_data/caddy_config volumes.