Files
linux-voice-assistant/docker-compose.yml
T
Florian Asche 1ea79aa8bb feat(docker): add custom image and tag env configuration (#306)
- Replace hardcoded image values with overrideable env variables
- Standardize version env var from LVA_VERSION to LVA_IMAGE_TAG
- Add new env options documentation to .env.example
- Add dev.env to gitignore
- Disable default mic noise suppression in dev compose

BREAKING CHANGE: LVA_VERSION env var replaced with LVA_IMAGE_TAG
2026-04-22 17:22:55 +02:00

73 lines
2.3 KiB
YAML

---
services:
# Fix permissions for wakeword_data and configuration volume
fix-permissions:
image: "${LVA_IMAGE:-ghcr.io/ohf-voice/linux-voice-assistant}:${LVA_IMAGE_TAG:-latest}"
entrypoint: []
command: "chown -R ${LVA_USER_ID:-1000}:${LVA_USER_GROUP:-1000} /app/local /app/configuration /app/wakewords/custom /app/sounds/custom"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
- PULSE_SERVER=${LVA_PULSE_SERVER:-/run/user/1000/pulse/native}
- PULSE_COOKIE=${LVA_PULSE_COOKIE:-/run/user/1000/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: "${LVA_IMAGE:-ghcr.io/ohf-voice/linux-voice-assistant}:${LVA_IMAGE_TAG:-latest}"
restart: unless-stopped
network_mode: "host"
user: "${LVA_USER_ID:-1000}:${LVA_USER_GROUP:-1000}"
environment:
# Pulseaudio
- XDG_RUNTIME_DIR=${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
- PULSE_SERVER=${LVA_PULSE_SERVER:-/run/user/1000/pulse/native}
- PULSE_COOKIE=${LVA_PULSE_COOKIE:-/run/user/1000/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:-/run/user/1000}:${LVA_XDG_RUNTIME_DIR:-/run/user/1000}
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: