Add recording cleanup container to remove noise files
Alpine-based sdr-cleanup container runs a find loop every 5 minutes, deleting MP3 files under 3 KB (configurable via SIZE_THRESHOLD env var) to keep the web browser and Samba share free of false-positive recordings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
## 1. Cleanup Script
|
||||
|
||||
- [x] 1.1 Create `cleanup-recordings.sh` in the repo with configurable size threshold (default 3k), `-mmin +1` safety guard, targeting `/recordings`
|
||||
- [x] 1.2 Make the script executable and add a usage comment at the top
|
||||
|
||||
## 2. Docker Compose
|
||||
|
||||
- [x] 2.1 Update `cleanup-recordings.sh` to run as a loop with sleep instead of one-shot, read threshold from `SIZE_THRESHOLD` env var
|
||||
- [x] 2.2 Add `sdr-cleanup` service to `docker-compose.yml` using `alpine` image, mounting the recordings volume and running the script
|
||||
|
||||
## 3. Deployment Cleanup
|
||||
|
||||
- [x] 3.1 Remove the host crontab entry installed earlier on `sdr-pi`
|
||||
- [x] 3.2 Remove the script copy from `/home/m/cleanup-recordings.sh` on `sdr-pi`
|
||||
|
||||
## 4. Verification
|
||||
|
||||
- [x] 4.1 Deploy updated docker-compose to `sdr-pi` and confirm the cleanup container starts and deletes small files
|
||||
Reference in New Issue
Block a user