fix: Docker volume path, graceful shutdown deadline, inline stream headers

docker-compose.yml: mount ./recordings at /app/recordings (matches
output_directory = recordings in config.ini); previously the recorder
wrote to /app/recordings while the web container read from /recordings,
causing all files to appear missing — explaining the 9-byte Not-found
download from /stream/ and the 0-byte recordings in the UI.
Add stop_grace_period: 30s so Docker waits long enough for files to close.

isr.py: replace per-thread join(timeout=5) with a shared 25 s deadline;
with N recorders the old code could exceed Docker's SIGKILL window and
leave WAV/FLAC files unclosed (corrupt headers).

web.py: add Content-Disposition: inline to /stream/ responses so
browsers never treat the audio response as a file download.

CLAUDE.md: document web.py endpoints, status.json lifecycle, corrected
Docker volume layout, and web.py CLI flags.
This commit is contained in:
2026-04-26 13:10:14 +02:00
parent 624f1f2664
commit da67523170
4 changed files with 26 additions and 7 deletions
+2 -1
View File
@@ -3,11 +3,12 @@ services:
build: .
volumes:
- ./config.ini:/app/config.ini:ro
- ./recordings:/recordings
- ./recordings:/app/recordings # matches output_directory = recordings in config.ini
# Soundcard (ALSA) access — comment out if you only record streams
devices:
- /dev/snd:/dev/snd
restart: unless-stopped
stop_grace_period: 30s # allow time for open files to be closed cleanly
web:
build: .