Add Nginx web server for browsing recordings

Serves the recordings directory over HTTP with autoindex on port 8080.
Users can browse by date and play MP3 files natively in the browser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Smith
2026-03-19 11:42:45 +00:00
parent 97879a9f59
commit 9ff0506cae
8 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
### Requirement: Serve recordings directory over HTTP
The system SHALL serve the contents of the recordings directory via an Nginx web server with directory listing enabled.
#### Scenario: Browse channel directories
- **WHEN** a user navigates to the root URL of the web server
- **THEN** the server displays a directory listing showing the channel subdirectories
#### Scenario: Browse date directories within a channel
- **WHEN** a user clicks a channel directory
- **THEN** the server displays a directory listing of date subdirectories for that channel
#### Scenario: Browse recording files within a date
- **WHEN** a user clicks a date directory
- **THEN** the server displays a listing of MP3 recording files
### Requirement: Browser-native MP3 playback
The system SHALL serve MP3 files with correct MIME type so browsers can play them natively.
#### Scenario: Play a recording
- **WHEN** a user clicks an MP3 file link in the directory listing
- **THEN** the browser opens and plays the MP3 file using its native audio player
### Requirement: Docker deployment
The web server SHALL run as a Docker container defined in `docker-compose.yml`, mounting the recordings directory read-only.
#### Scenario: Start alongside recorder
- **WHEN** a user runs `docker compose up` on the Pi
- **THEN** the Nginx service starts alongside the `sdr-recorder` service and is accessible via HTTP
#### Scenario: Read-only access to recordings
- **WHEN** the Nginx container accesses the recordings volume
- **THEN** the volume is mounted read-only, preventing modification of recording files