da67523170
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.
21 lines
596 B
YAML
21 lines
596 B
YAML
services:
|
|
recorder:
|
|
build: .
|
|
volumes:
|
|
- ./config.ini:/app/config.ini:ro
|
|
- ./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: .
|
|
volumes:
|
|
- ./recordings:/recordings:ro
|
|
ports:
|
|
- "8080:8080"
|
|
restart: unless-stopped
|
|
command: ["python", "web.py", "--dir", "/recordings"]
|