Add docker-compose.yml
initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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
|
||||
- /path/to/raw/inbox:/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 10 seconds for transfer to finish...' &&
|
||||
sleep 10 &&
|
||||
docker exec -u abc beets beet import -q /inbox
|
||||
done
|
||||
"
|
||||
Reference in New Issue
Block a user