- nginx serves the UI over HTTPS on 8090 with a self-signed cert (browsers require a secure context for microphone access) - added /token endpoint (tiny Python HTTP server) that signs LiveKit JWTs server-side, keeping the API secret out of the browser - app.js now fetches a signed token from /token and uses wss:// when the page is served over HTTPS - supervisord runs the token-server as a fourth process
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
[supervisord]
|
|
nodaemon=false
|
|
logfile=/var/log/supervisor/supervisord.log
|
|
pidfile=/run/supervisord.pid
|
|
|
|
[program:livekit]
|
|
command=/usr/local/bin/livekit --config /etc/livekit.yaml
|
|
user=root
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/livekit.log
|
|
stderr_logfile=/var/log/supervisor/livekit_err.log
|
|
|
|
[program:agent]
|
|
command=/opt/voice-agent/.venv/bin/python /opt/voice-agent/agent.py start
|
|
user=voiceuser
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/agent.log
|
|
stderr_logfile=/var/log/supervisor/agent_err.log
|
|
environment=
|
|
LIVEKIT_URL="%(ENV_LIVEKIT_URL)s",
|
|
LIVEKIT_API_KEY="%(ENV_LIVEKIT_API_KEY)s",
|
|
LIVEKIT_API_SECRET="%(ENV_LIVEKIT_API_SECRET)s",
|
|
AZURE_SPEECH_KEY="%(ENV_AZURE_SPEECH_KEY)s",
|
|
AZURE_SPEECH_REGION="%(ENV_AZURE_SPEECH_REGION)s",
|
|
AZURE_TTS_VOICE="%(ENV_AZURE_TTS_VOICE)s",
|
|
GEMMA_BASE_URL="%(ENV_GEMMA_BASE_URL)s",
|
|
GEMMA_MODEL="%(ENV_GEMMA_MODEL)s",
|
|
GEMMA_API_KEY="%(ENV_GEMMA_API_KEY)s"
|
|
|
|
[program:web]
|
|
command=/usr/sbin/nginx -g "daemon off;"
|
|
user=root
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/web.log
|
|
stderr_logfile=/var/log/supervisor/web_err.log
|
|
|
|
[program:token-server]
|
|
command=/opt/voice-agent/.venv/bin/python /opt/voice/token_server.py
|
|
user=voiceuser
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/token.log
|
|
stderr_logfile=/var/log/supervisor/token_err.log
|
|
environment=
|
|
LIVEKIT_API_KEY="%(ENV_LIVEKIT_API_KEY)s",
|
|
LIVEKIT_API_SECRET="%(ENV_LIVEKIT_API_SECRET)s"
|