Files
lunafreya-lva/docker-compose.yml
T
2026-03-10 21:05:41 -04:00

199 lines
6.1 KiB
YAML

name: benedikta
x-lva-env: &lva-env
environment:
# Linux-Voice-Assistant - Docker Environment Configuration
# Copy this file to .env and customize for your setup by 'cp .env.example .env'
### Enable debug mode (optional):
ENABLE_DEBUG: "1"
### List audio devices (optional):
# if enabled normal startup is disabled
# LIST_DEVICES="1"
### User ID:
# This is used to set the correct permissions for the accessing the audio device and accessing the PulseAudio socket
LVA_USER_ID: 1000
LVA_USER_GROUP: 1000
### Name for the client (optional):
CLIENT_NAME: "benedikta"
### PulseAudio socket path on the host:
# PulseAudio Server: /run/user/1000/pulse
# Pipewire Server: /run/user/1000/pulse/native
LVA_PULSE_SERVER: unix:/run/user/1000/pulse/native
LVA_XDG_RUNTIME_DIR: /run/user/1000
PULSE_SERVER: unix:/run/user/1000/pulse/native
XDG_RUNTIME_DIR: "/run/user/1000"
### Path to the preferences file (optional):
# PREFERENCES_FILE="/app/configuration/preferences.json"
### Network interface (optional):
# NETWORK_INTERFACE="eth0"
### IP-Address for the api (optional):
# HOST="0.0.0.0"
### Port for the api (optional):
# PORT="6053"
### Audio input device (optional):
# AUDIO_INPUT_DEVICE="default"
### Audio output device (optional):
# AUDIO_OUTPUT_DEVICE="default"
### Enable thinking sound (optional):
ENABLE_THINKING_SOUND: "1"
### Wake word directory (optional):
# path for custom files in docker is for example "app/wakewords/custom"
# WAKE_WORD_DIR="app/wakewords"
### Wake model (optional):
WAKE_MODEL: "hey_luna"
### Stop model (optional):
# STOP_MODEL="stop"
### Refactory seconds (optional):
# REFACTORY_SECONDS="2"
### Sound files (optional):
# path for custom files in docker is for example "sounds/custom/your_soundfile.flac"
# WAKEUP_SOUND="sounds/wake_word_triggered.flac"
# TIMER_FINISHED_SOUND="sounds/timer_finished.flac"
# PROCESSING_SOUND="sounds/processing.wav"
# MUTE_SOUND="sounds/mute_switch_on.flac"
# UNMUTE_SOUND="sounds/mute_switch_off.flac"
services:
beszel-agent:
container_name: beszel-agent
environment:
LISTEN: 45876
KEY: ${BESZEL_BENEDIKTA_AGENT_KEY}
TOKEN: ${BESZEL_BENEDIKTA_TOKEN}
HUB_URL: http://192.168.1.254:22220
expose:
- 45876
image: henrygd/beszel-agent:latest@sha256:00829897142460910ed1de162b166d2494916c061ecdb092de3b0653818c02b9
network_mode: host
restart: unless-stopped
volumes:
- beszel-agent-data:/var/lib/beszel-agent
- /var/run/docker.sock:/var/run/docker.sock:ro
- /dev/mmcblk0:/extra-filesystems/dev/mmcblk0:ro
docker-socket-proxy:
container_name: dockerproxy
environment:
AUTH: 1
BUILD: 1
COMMIT: 1
CONFIGS: 1
CONTAINERS: 1
DISTRIBUTION: 1
EVENTS: 1
EXEC: 1
GPRC: 1
IMAGES: 1
INFO: 1
NETWORKS: 1
NODES: 1
POST: 1
PLUGINS: 1
SERVICES: 1
SESSION: 1
SYSTEM: 1
TASKS: 1
VOLUMES: 1
LOG_LEVEL: debug
image: ghcr.io/tecnativa/docker-socket-proxy:latest@sha256:1f3a6f303320723d199d2316a3e82b2e2685d86c275d5e3deeaf182573b47476
ports:
- 2375:2375
privileged: true
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
linux-voice-assistant:
container_name: linux-voice-assistant
image: ghcr.io/ohf-voice/linux-voice-assistant:1.1.8@sha256:5ad9132ff6a0333f79c1ad8f62ee19ce7d0f6250372eb3e644b4ad8e36cf8c13
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}
group_add:
- audio
# Priority for audio process
cap_add:
- SYS_NICE
volumes:
# Wakeword data and configuration
- lva_wakeword_data:/app/local
- lva_wakeword_custom:/app/wakewords/custom
- lva_configuration:/app/configuration
- ${BENEDIKTA_DOCKER_DIR}/linux-voice-assistant/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:
- lva-fix-permissions
# Health check for process
healthcheck:
test: ["CMD", "pgrep", "-f", "linux_voice_assistant"]
interval: 30s
timeout: 5s
retries: 3
start_period: 90s
lva-fix-permissions:
container_name: lva-fix-permissions
image: "ghcr.io/ohf-voice/linux-voice-assistant:latest@sha256:5ad9132ff6a0333f79c1ad8f62ee19ce7d0f6250372eb3e644b4ad8e36cf8c13"
entrypoint: []
command: "chown -R ${LVA_USER_ID}:${LVA_USER_GROUP} /app/local /app/configuration /app/wakewords/custom /app/sounds/custom"
<<: *lva-env
group_add:
- audio
volumes:
# Wakeword data and configuration
- lva_wakeword_data:/app/local
- lva_wakeword_custom:/app/wakewords/custom
- lva_configuration:/app/configuration
- ${BENEDIKTA_DOCKER_DIR}/linux-voice-assistant/sounds/custom:/app/sounds/custom
restart: "no"
portainer-agent:
container_name: portainer_agent
image: portainer/agent:latest@sha256:e3a9bcb1e5862edaca62d6e54f70efc5815dff33e955a30578b174423b19977c
volumes:
- /:/host
- /var/lib/docker/volumes:/var/lib/docker/volumes
- /var/run/docker.sock:/var/run/docker.sock
restart: always
ports:
- 9001:9001
signoz-logspout:
command: signoz://192.168.1.254:8082
container_name: signoz-logspout
environment:
ENV: prod
SIGNOZ_LOG_ENDPOINT: http://192.168.1.254:8082
image: pavanputhra/logspout-signoz@sha256:6da8ce12279a5262de8b2d5c083ce82d4c878c4eab702b4d328afe147ed7553b
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
beszel-agent-data:
name: beszel-agent-data
lva_wakeword_data:
name: lva_wakeword_data
lva_wakeword_custom:
name: lva_wakeword_custom
lva_configuration:
name: lva_configuration