From a24843c3bd215689b61ef28d7fa71da3363c4183 Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 6 Sep 2022 23:38:58 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + bin/entrypoint-music.sh | 13 +++++++++---- config/mpd/mpd.conf | 6 +++--- config/nginx/navidrome.conf | 1 - 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f111502..48b0429 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ docker run -d \ -v $HOME/.local/share/docker/storage/music/music/data:/data \ -v $HOME/.local/share/docker/storage/music/music/config:/config \ -p 80:80 \ +-p 6600:6600 \ casjaysdevdocker/music:latest ``` diff --git a/bin/entrypoint-music.sh b/bin/entrypoint-music.sh index 08a795c..9937b7e 100755 --- a/bin/entrypoint-music.sh +++ b/bin/entrypoint-music.sh @@ -9,11 +9,11 @@ # @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments # @@Created : Tuesday, Sep 06, 2022 21:32 EDT # @@File : entrypoint-music.sh -# @@Description : +# @@Description : # @@Changelog : New script # @@TODO : Better documentation -# @@Other : -# @@Resource : +# @@Other : +# @@Resource : # @@Terminal App : no # @@sudo/root : no # @@Template : other/docker-entrypoint @@ -94,6 +94,9 @@ fi [ -f "/etc/.env.sh" ] && rm -Rf "/etc/.env.sh" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional commands +if [ ! -L "/etc/nginx/http.d/default.conf" ]; then + ln -sf "/config/nginx/navidrome.conf" "/etc/nginx/http.d/default.conf" +fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case "$1" in @@ -119,7 +122,9 @@ healthcheck) # Docker healthcheck *) # Execute primary command if [ $# -eq 0 ]; then - __exec_bash "/bin/bash" + [ -f "/data/mpd/mpd.pid" ] && rm -Rf "/data/mpd/mpd.pid" + mpd --no-daemon /config/mpd/mpd.conf & + navidrome --configfile /config/navidrome/navidrome.toml else __exec_bash "/bin/bash" fi diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf index ed70f96..dec63c1 100644 --- a/config/mpd/mpd.conf +++ b/config/mpd/mpd.conf @@ -1,11 +1,11 @@ # Files and directories ####################################################### music_directory "/data/music" playlist_directory "/data/playlists" -db_file "/data/mpd/database/tag_cache" +state_file "/data/mpd/state" log_file "/data/mpd/mpd.log" pid_file "/data/mpd/mpd.pid" -state_file "/data/mpd/database/state" -sticker_file "/data/mpd/database/sticker.sql" +db_file "/data/mpd/tag_cache" +sticker_file "/data/mpd/sticker.sql" user "mpd" bind_to_address "0.0.0.0" port "6600" diff --git a/config/nginx/navidrome.conf b/config/nginx/navidrome.conf index 34bb878..689d5b9 100644 --- a/config/nginx/navidrome.conf +++ b/config/nginx/navidrome.conf @@ -1,7 +1,6 @@ server { listen 80 default_server; listen [::]:80 default_server; - server_name *; location / { # replace local-address with your navidrome server's IP