Files
hope-voice-api/supervisord.conf
T
snowspeeder d7c385301e
Rebuild & Deploy / rebuild (push) Successful in 59s
fix: CI deploy parity with compose — media env, volume, healthcheck
A missing env var aborts supervisord's %(ENV_x)s config expansion and
takes every program down, which is why the media-player merge failed
CI (run 151): rebuild.yml's docker run did not pass MEDIA_DIR /
MEDIA_SERVER_PORT / YTDLP_COOKIES.

- supervisord.conf: media-server inherits those vars from the container
  environment instead of hard-requiring them (media_server.py has safe
  defaults for all three).
- rebuild.yml: mount the media library volume, pass the media env, and
  extend the healthcheck to the media server healthz.
- compose: YTDLP_COOKIES defaults to the conventional /data/media/
  cookies.txt path (ignored unless the file exists).

Parity verified: container started with CI's exact env (no media vars)
— all five programs RUNNING.
2026-08-29 15:45:54 -04:00

74 lines
2.2 KiB
Plaintext

[supervisord]
nodaemon=true
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=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:agent]
command=/opt/voice-agent/.venv/bin/python /opt/voice-agent/agent.py start
user=voiceuser
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
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",
LLM_BASE_URL="%(ENV_LLM_BASE_URL)s",
LLM_MODEL="%(ENV_LLM_MODEL)s",
LLM_API_KEY="%(ENV_LLM_API_KEY)s",
WEB_MCP_ENABLED="%(ENV_WEB_MCP_ENABLED)s",
FIRECRAWL_BASE="%(ENV_FIRECRAWL_BASE)s",
VOICE_USERS_FILE="%(ENV_VOICE_USERS_FILE)s"
[program:web]
command=/usr/sbin/nginx -g "daemon off;"
user=root
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:token-server]
command=/opt/voice-agent/.venv/bin/python /opt/voice/token_server.py
user=voiceuser
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
environment=
LIVEKIT_API_KEY="%(ENV_LIVEKIT_API_KEY)s",
LIVEKIT_API_SECRET="%(ENV_LIVEKIT_API_SECRET)s",
VOICE_USERS_FILE="%(ENV_VOICE_USERS_FILE)s",
VOICE_DEFAULT_USER="%(ENV_VOICE_DEFAULT_USER)s"
[program:media-server]
; Runs as root because the /data/media bind mount is a host (Unraid) share
; whose uid does not match the container's voiceuser.
; MEDIA_DIR / MEDIA_SERVER_PORT / YTDLP_COOKIES are inherited from the
; container environment (media_server.py has safe defaults for all three) —
; do NOT list them via %(ENV_x)s here: a missing var aborts supervisord's
; config expansion and takes every program down with it.
command=/opt/voice-agent/.venv/bin/python /opt/voice/media_server.py
user=root
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true