🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-09-10 16:05:13 -04:00
parent 32b24c2060
commit ebd0774d95
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
3 changed files with 22 additions and 22 deletions

View File

@ -5,7 +5,7 @@ ARG alpine_version=edge
ARG LICENSE=WTFPL \ ARG LICENSE=WTFPL \
IMAGE_NAME=music \ IMAGE_NAME=music \
TIMEZONE=America/New_York \ TIMEZONE=America/New_York \
PORT=6600 PORT=80
ENV SHELL=/bin/bash \ ENV SHELL=/bin/bash \
TERM=xterm-256color \ TERM=xterm-256color \
@ -18,7 +18,8 @@ RUN mkdir -p /bin/ /config/ /data/ && \
echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/community" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/community" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/testing" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/testing" >> /etc/apk/repositories && \
apk update -U --no-cache && \ apk update -U --no-cache && \
apk add --no-cache mpd mpc navidrome apk add --no-cache mpd mpc navidrome && \
rm -Rf /etc/mpd.conf
COPY ./bin/. /usr/local/bin/ COPY ./bin/. /usr/local/bin/
COPY ./config/. /etc/ COPY ./config/. /etc/

View File

@ -47,14 +47,15 @@ __exec_bash() {
return ${exitCode:-$?} return ${exitCode:-$?}
} }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__mpd_start() { __start() {
pgrep mpd &>/dev/null || mpd --verbose /config/mpd/mpd.conf pgrep mpd &>/dev/null || mpd /config/mpd/mpd.conf
sleep 10 sleep 10
if pgrep mpd &>/dev/null; then if pgrep mpd &>/dev/null; then
mpc status 2>&1 | grep -q 'playing' || mpc play &>/dev/null mpc status 2>&1 | grep -q 'playing' || mpc play &>/dev/null
else else
echo "MPD seems to have not started" 1>&2 echo "MPD seems to have not started" 1>&2
fi fi
navidrome --configfile "/config/navidrome/navidrome.toml"
} }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Define default variables # Define default variables
@ -147,8 +148,7 @@ healthcheck) # Docker healthcheck
*) # Execute primary command *) # Execute primary command
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
__mpd_start & __start
navidrome --configfile "/config/navidrome/navidrome.toml"
else else
__exec_bash "$@" __exec_bash "$@"
fi fi

View File

@ -1,10 +1,10 @@
# Files and directories ####################################################### # Files and directories #######################################################
music_directory "/data/music" music_directory "/data/music"
playlist_directory "/data/playlists" playlist_directory "/data/playlists"
state_file "/data/mpd/state.txt"
log_file "/data/mpd/mpd.log" log_file "/data/mpd/mpd.log"
pid_file "/data/mpd/mpd.pid" pid_file "/data/mpd/mpd.pid"
db_file "/data/mpd/tag_cache.db" db_file "/data/mpd/cache.db"
state_file "/data/mpd/state.txt"
sticker_file "/data/mpd/sticker.sql" sticker_file "/data/mpd/sticker.sql"
user "mpd" user "mpd"
bind_to_address "0.0.0.0" bind_to_address "0.0.0.0"
@ -23,22 +23,21 @@ zeroconf_name "mpd server"
filesystem_charset "UTF-8" filesystem_charset "UTF-8"
# Output ####################################################################### # Output #######################################################################
audio_output { audio_output {
type "null" type "null"
name "This server does not need to play music, but it can" name "This server does not need to play music, but it can"
} }
audio_output { audio_output {
type "httpd" type "httpd"
name "stream" name "stream"
encoder "lame" encoder "lame"
port "8000" port "8000"
bitrate "128" bitrate "128"
max_clients "0" max_clients "0"
mixer_type "software" mixer_type "software"
format "44100:16:2" format "44100:16:2"
always_on "yes"
} }
# Input ####################################################################### # Input #######################################################################
input { input {
plugin "curl" plugin "curl"
} }
############################################################################### ###############################################################################