diff --git a/CLAUDE.md b/CLAUDE.md index 0494e35..38a8e4f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -83,7 +83,7 @@ The `output_directory` value is used as-is: a relative path like `recordings` re Two services share a `./recordings` bind mount: - `recorder` — runs `isr.py`; volume at `/app/recordings`; mounts `asound.conf` as `/etc/asound.conf`; maps `/dev/snd`; `ipc: host` for dsnoop shared memory; `stop_grace_period: 30s` -- `web` — runs `web.py`; same `./recordings` read-only at `/recordings`; exposes port 8080 +- `web` — runs `web.py`; same `./recordings` read-only at `/recordings`; exposes port 8080 internally (mapped to 8050 on the host) **Sharing the soundcard with darkice (or any other ALSA app):** ALSA `hw:` devices are exclusive. `asound.conf` defines a `dsnoop` virtual device `shared_mic` that both processes use instead: diff --git a/README.md b/README.md index d22d7e0..7c81123 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ cp config.example.ini config.ini # edit config.ini to add your sources (no path changes needed for Docker) docker compose up -d -# recorder starts immediately; web UI at http://:8080 +# recorder starts immediately; web UI at http://:8050 docker compose logs -f # tail logs from both services docker compose down # graceful stop (waits up to 30 s for files to close) ``` diff --git a/docker-compose.yml b/docker-compose.yml index 10b44f8..8f46237 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: build: . volumes: - ./recordings:/recordings:ro - - ./analyses:/analyses + - ./recordings/analyses:/recordings/analyses ports: - - "8080:8080" + - "8050:8080" restart: unless-stopped - command: ["python", "web.py", "--dir", "/recordings", "--analyses-dir", "/analyses"] + command: ["python", "web.py", "--dir", "/recordings"] diff --git a/web.py b/web.py index 1b3cf1c..4624c3b 100644 --- a/web.py +++ b/web.py @@ -1656,9 +1656,10 @@ def main(): prune_orphan_analyses(analyses_dir, rec_dir) + _analyses_dir = analyses_dir # class body can't close over a name it also assigns class Handler(_Handler): recordings_dir = str(rec_dir) - analyses_dir = str(analyses_dir) + analyses_dir = str(_analyses_dir) threshold = args.threshold min_gap = args.min_gap