Last active
January 24, 2024 08:58
Revisions
-
jee-r revised this gist
Jan 24, 2024 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,4 +11,6 @@ RUN apk update ; \ inotify-tools ; \ rm -rf /tmp/* /var/cache/apk/* COPY ./entrypoint /usr/local/bin/entrypoint CMD ["/usr/local/bin/entrypoint"] -
jee-r created this gist
Jan 24, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ FROM alpine:3.19 ENV WATCH_DIR \ BETANIN_API_KEY \ BETANIN_API_URL RUN apk update ; \ apk upgrade ; \ apk add --no-cache \ curl \ inotify-tools ; \ rm -rf /tmp/* /var/cache/apk/* COPY ./entrypoint /usr/local/bin/entrypoint This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ version: '3' services: betanin: image: ghcr.io/jee-r/beets:main container_name: betanin hostname: betanin user: 1000:1000 ports: - 4030:4030 environment: - MODE=betanin - BETANIN_HOST=0.0.0.0 - BETANIN_PORT=4030 - UMASK_SET=022 - TZ=Europe/Paris volumes: - ./betanin/config/:/config - /torrents:/torrents - /Media/Music:/Media/Music watcher: container_name: beet_watcher image: ghcr.io/jee-r/watcher:main build: ./ user: 1000:1000 environment: - UMASK_SET=022 - TZ=Europe/Paris - BETANIN_API_KEY=REDACTED - BETANIN_API_URL=http://betanin:4030/api/torrents - WATCH_DIR=/Media/Music/Unsorted/ volumes: - /Media/Music:/Media/Music This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ #!/bin/sh inotifywait -m -e create,moved_to --format '%w%f' "$WATCH_DIR" | while IFS= read -r dir_path; do sleep 20s response=$(curl --silent --output /dev/null --request POST --data-urlencode "both=$dir_path" --header "Accept: application/json" --header "X-API-Key: $BETANIN_API_KEY" "$BETANIN_API_URL") echo $response done