-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (77 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
82 lines (77 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.8'
services:
multiroom-audio:
build:
context: .
dockerfile: docker/Dockerfile
container_name: multiroom-audio
restart: unless-stopped
ports:
- "8096:8096"
# ============================================
# USB Device Passthrough (Linux only)
# ============================================
# Uncomment the 'devices:' section below to enable hardware access.
#
# For AUDIO DEVICES:
# - /dev/snd:/dev/snd
#
# For USB RELAY BOARDS (12V trigger control):
# USB HID relay boards need both USB bus (discovery) and hidraw (control):
# - /dev/bus/usb:/dev/bus/usb # Required: device discovery
# - /dev/hidraw0:/dev/hidraw0 # Required: relay control (one per board)
# - /dev/hidraw1:/dev/hidraw1 # Add more as needed
#
# FTDI relay boards need USB bus only:
# - /dev/bus/usb:/dev/bus/usb
#
# Modbus/CH340 relay boards need the serial port:
# - /dev/ttyUSB0:/dev/ttyUSB0
#
# devices:
# - /dev/snd:/dev/snd
# - /dev/bus/usb:/dev/bus/usb
# - /dev/hidraw0:/dev/hidraw0
# - /dev/hidraw1:/dev/hidraw1
# - /dev/ttyUSB0:/dev/ttyUSB0
volumes:
# Persistent configuration storage
- ./config:/app/config
- ./logs:/app/logs
# Device capability detection (sample rates, bit depths, channels)
- /proc/asound:/host/asound:ro
# Pass through ALSA configuration (optional, typically used when you have a custom config)
- /usr/share/alsa:/usr/share/alsa:ro
# - /etc/asound.conf:/etc/asound.conf:ro
environment:
- PULSE_SERVER=unix:/run/user/1000/pulse/native
- DISPLAY=${DISPLAY}
# required for mDNS discovery of sendspin sever
network_mode: host
privileged: false
cap_add:
- SYS_NICE # Required for audio thread priority
# ============================================
# Optional: SYS_RAWIO for FTDI relay boards
# ============================================
# If the ftdi_sio kernel driver claims your FTDI device before
# libftdi can access it, uncomment SYS_RAWIO to allow libftdi
# to detach the kernel driver automatically.
# This is NOT needed for USB HID relay boards.
# - SYS_RAWIO
group_add:
- audio
user: "0:29" # root user, audio group
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8096/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Create named volumes for persistence
volumes:
multiroom_config:
driver: local
multiroom_logs:
driver: local