feat: all-in-one production deployment with install script
Redesign deployment as a single docker-compose with Backspace, Caddy (auto-HTTPS), and LiveKit (voice/video) using hybrid networking: Backspace+Caddy on isolated bridge, LiveKit on host mode for WebRTC. - Add install.sh: interactive installer that handles Docker setup, domain/DNS verification, secret generation, LiveKit config, and deployment with health-check wait - Add Caddyfile: static reverse proxy config using Caddy env vars, routes /livekit/* to host-mode LiveKit via host.docker.internal - Rewrite docker-compose.yml: all-in-one with profiles (voice), no external volumes/networks, bind mount ./data for visibility - Fix livekit.ts: use LIVEKIT_URL env var directly instead of Host-header derivation that made the env var dead code - Fix Dockerfile: health check reads $PORT dynamically - Update .env.example: add DOMAIN, COMPOSE_PROFILES documentation - Update .gitignore: add livekit.yaml (contains secrets)
This commit is contained in:
@@ -55,10 +55,7 @@ export async function livekitRoutes(app: FastifyInstance): Promise<void> {
|
||||
|
||||
const jwt = await token.toJwt();
|
||||
|
||||
const requestHost = request.headers.host?.replace(/:\d+$/, '') || '';
|
||||
const livekitUrl = requestHost
|
||||
? `wss://${requestHost}/livekit`
|
||||
: (config.livekit.url ?? '');
|
||||
const livekitUrl = config.livekit.url ?? '';
|
||||
|
||||
const response: LiveKitTokenResponse = {
|
||||
token: jwt,
|
||||
|
||||
Reference in New Issue
Block a user