Files
beets/docker-compose.yml
mattspeer da604503ec Update docker-compose.yml
updated message to correctly state 30 seconds instead of 10
2026-06-02 19:28:24 -05:00

34 lines
1.3 KiB
YAML

services:
beets:
image: lscr.io/linuxserver/beets:latest
container_name: beets
restart: unless-stopped
environment:
- PUID=1000 # Adjust to your user ID
- PGID=1000 # Adjust to your group ID
- TZ=America/Chicago
volumes:
- /srv/docker/beets/config:/config # Stores beets database and config.yaml
- /downloads/complete/music:/inbox # WHERE YOU DROP UNORGANIZED MUSIC
- /srv/music:/music # YOUR FINAL CLEAN MUSIC LIBRARY
ports:
- 8337:8337
# This sidecar service watches the folder and triggers Beets automatically
beets-watcher:
image: alpine:latest
container_name: beets-watcher
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Allows execution of commands inside the beets container
- /downloads/complete/music:/inbox:ro # Needs read access to see new files
entrypoint: >
/bin/sh -c "
apk add --no-cache inotify-tools docker-cli &&
echo 'Watching /inbox for new files...' &&
while inotifywait -r -e moved_to -e create /inbox; do
echo 'New files detected! Waiting 30 seconds for transfer to finish...' &&
sleep 30 &&
docker exec -u abc beets beet import -q /inbox
done
"