Files
hope-voice-api/docker-compose.yml
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

36 lines
1.5 KiB
YAML

services:
voice:
build: .
container_name: voice
network_mode: host
environment:
LIVEKIT_URL: "http://localhost:7880"
LIVEKIT_API_KEY: "${LIVEKIT_API_KEY:-devkey}"
LIVEKIT_API_SECRET: "${LIVEKIT_API_SECRET:-hopevoice-devsecret-2026-lan-only}"
AZURE_SPEECH_KEY: "${AZURE_SPEECH_KEY:?Set AZURE_SPEECH_KEY in .env}"
AZURE_SPEECH_REGION: "${AZURE_SPEECH_REGION:-eastus}"
AZURE_TTS_VOICE: "${AZURE_TTS_VOICE:-en-US-Ava:DragonHDOmniLatestNeural}"
LLM_BASE_URL: "${LLM_BASE_URL:-http://192.168.86.2:3005/api}"
LLM_MODEL: "${LLM_MODEL:-qwen2.5-vl-3b}"
LLM_API_KEY: "${LLM_API_KEY:-not-needed}"
WEB_MCP_ENABLED: "${WEB_MCP_ENABLED:-true}"
FIRECRAWL_BASE: "${FIRECRAWL_BASE:-http://192.168.86.2:3002}"
WEB_PORT: "${WEB_PORT:-9178}"
VOICE_USERS_FILE: "/etc/hope/users.json"
VOICE_DEFAULT_USER: "${VOICE_DEFAULT_USER:-shane}"
MEDIA_DIR: "/data/media"
MEDIA_SERVER_PORT: "${MEDIA_SERVER_PORT:-8092}"
YTDLP_COOKIES: "${YTDLP_COOKIES:-/data/media/cookies.txt}"
volumes:
- ./livekit.yaml:/etc/livekit.yaml:ro
- ./certs:/etc/voice/certs
- ./skills:/skills
- ./media:/data/media
healthcheck:
test: ["CMD-SHELL", "curl -sk https://localhost:$${WEB_PORT:-9178}/ -o /dev/null && curl -s http://localhost:7880/ -o /dev/null && curl -s http://localhost:$${MEDIA_SERVER_PORT:-8092}/media/api/healthz -o /dev/null"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
restart: unless-stopped