Files
linux-voice-assistant/docker-compose.yml
T
Florian Asche b53678e0f3 fix: cookie error (#127) (#210)
* Add support for custom PulseAudio cookie configuration
2026-03-07 17:33:48 +01:00

73 lines
2.1 KiB
YAML

---
services:
# Fix permissions for wakeword_data and configuration volume
fix-permissions:
image: "ghcr.io/ohf-voice/linux-voice-assistant:latest"
entrypoint: []
command: "chown -R ${LVA_USER_ID}:${LVA_USER_GROUP} /app/local /app/configuration /app/wakewords/custom /app/sounds/custom"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR}
- PULSE_SERVER=${LVA_PULSE_SERVER}
- PULSE_COOKIE=${LVA_PULSE_COOKIE}
env_file: ${ENV_FILE:-.env}
group_add:
- audio
volumes:
# Wakeword data and configuration
- wakeword_data:/app/local
- wakeword_custom:/app/wakewords/custom
- configuration:/app/configuration
- sounds_custom:/app/sounds/custom
restart: "no"
# Linux Voice Assistant
linux-voice-assistant:
container_name: linux-voice-assistant
image: "ghcr.io/ohf-voice/linux-voice-assistant:latest"
restart: unless-stopped
network_mode: "host"
user: "${LVA_USER_ID}:${LVA_USER_GROUP}"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR}
- PULSE_SERVER=${LVA_PULSE_SERVER}
- PULSE_COOKIE=${LVA_PULSE_COOKIE}
env_file: ${ENV_FILE:-.env}
group_add:
- audio
# Priority for audio process
cap_add:
- SYS_NICE
volumes:
# Wakeword data and configuration
- wakeword_data:/app/local
- wakeword_custom:/app/wakewords/custom
- configuration:/app/configuration
- sounds_custom:/app/sounds/custom
# Time and zone
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
# Pulseaudio
# /run/user/1000:/run/user/1000
- ${LVA_XDG_RUNTIME_DIR}:${LVA_XDG_RUNTIME_DIR}
depends_on:
- fix-permissions
# Health check for process
healthcheck:
test: ["CMD", "pgrep", "-f", "linux_voice_assistant"]
interval: 30s
timeout: 5s
retries: 3
start_period: 90s
#command:
# - --additional-parameters-here
# - --but-use-env-if-possible
volumes:
wakeword_data:
wakeword_custom:
configuration:
sounds_custom: