e67e27f047
hw:0,0 is an exclusive ALSA device — darkice holding it caused arecord to fail silently (stderr was /dev/null), leaving all recordings at 0 bytes with no errors in the log. asound.conf: defines a dsnoop virtual device 'shared_mic' that opens hw:0,0 once and lets multiple processes capture simultaneously. docker-compose.yml: mount asound.conf into the container as /etc/asound.conf; add ipc: host so the container shares the host IPC namespace (dsnoop uses System V shared memory which does not cross the container IPC boundary without this). config.example.ini: document the dsnoop setup and shared-device pattern. README, CLAUDE.md: document the full setup procedure.
23 lines
771 B
YAML
23 lines
771 B
YAML
services:
|
|
recorder:
|
|
build: .
|
|
volumes:
|
|
- ./config.ini:/app/config.ini:ro
|
|
- ./recordings:/app/recordings # matches output_directory = recordings in config.ini
|
|
- ./asound.conf:/etc/asound.conf:ro # dsnoop shared-capture config
|
|
# Soundcard (ALSA) access — comment out if you only record streams
|
|
devices:
|
|
- /dev/snd:/dev/snd
|
|
ipc: host # share IPC namespace with host so dsnoop shared memory works
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s # allow time for open files to be closed cleanly
|
|
|
|
web:
|
|
build: .
|
|
volumes:
|
|
- ./recordings:/recordings:ro
|
|
ports:
|
|
- "8080:8080"
|
|
restart: unless-stopped
|
|
command: ["python", "web.py", "--dir", "/recordings"]
|