🗃️ 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 \
IMAGE_NAME=music \
TIMEZONE=America/New_York \
PORT=6600
PORT=80
ENV SHELL=/bin/bash \
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/testing" >> /etc/apk/repositories && \
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 ./config/. /etc/

View File

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

View File

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