🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-09-07 01:06:04 -04:00
parent ca8c0a4f0f
commit ef1884fa17
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
4 changed files with 9 additions and 30 deletions

View File

@ -1,5 +1,7 @@
FROM casjaysdevdocker/alpine:latest as build FROM casjaysdevdocker/alpine:latest as build
ARG alpine_version=edge
ARG LICENSE=WTFPL \ ARG LICENSE=WTFPL \
IMAGE_NAME=music \ IMAGE_NAME=music \
TIMEZONE=America/New_York \ TIMEZONE=America/New_York \
@ -12,11 +14,11 @@ ENV SHELL=/bin/bash \
RUN mkdir -p /bin/ /config/ /data/ && \ RUN mkdir -p /bin/ /config/ /data/ && \
rm -Rf /bin/.gitkeep /config/.gitkeep /config/*/.gitkeep /data/.gitkeep /data/*/.gitkeep /etc/apk/repositories && \ rm -Rf /bin/.gitkeep /config/.gitkeep /config/*/.gitkeep /data/.gitkeep /data/*/.gitkeep /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/community" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/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 mpd navidrome nginx apk add --no-cache mpd navidrome
COPY ./bin/. /usr/local/bin/ COPY ./bin/. /usr/local/bin/
COPY ./config/. /etc/ COPY ./config/. /etc/

View File

@ -101,17 +101,11 @@ fi
[ -d "/data/playlists" ] || mkdir -p "/data/playlists" [ -d "/data/playlists" ] || mkdir -p "/data/playlists"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -d "/config/mpd" ] || mkdir -p "/config/mpd" [ -d "/config/mpd" ] || mkdir -p "/config/mpd"
[ -d "/config/nginx" ] || mkdir -p "/config/nginx"
[ -d "/config/navidrome" ] || mkdir -p "/config/navidrome" [ -d "/config/navidrome" ] || mkdir -p "/config/navidrome"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -f "/config/mpd/mpd.conf" ] || cp -Rf "/etc/mpd.conf" "/config/mpd/mpd.conf" [ -f "/config/mpd/mpd.conf" ] || cp -Rf "/etc/mpd.conf" "/config/mpd/mpd.conf"
[ -f "/config/nginx/navidrome.conf" ] || cp -Rf "/etc/nginx/navidrome.conf" "/config/navidrome.conf"
[ -f "/config/navidrome/navidrome.toml" ] || cp -Rf "/etc/navidrome/navidrome.toml" "/config/navidrome/navidrome.toml" [ -f "/config/navidrome/navidrome.toml" ] || cp -Rf "/etc/navidrome/navidrome.toml" "/config/navidrome/navidrome.toml"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ ! -L "/etc/nginx/http.d/default.conf" ] && [ -f "/config/nginx/navidrome.conf" ]; then
ln -sf "/config/nginx/navidrome.conf" "/etc/nginx/http.d/default.conf"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ! pgrep mpd &>/dev/null; then if ! pgrep mpd &>/dev/null; then
[ -f "/data/mpd/mpd.pid" ] && rm -Rf "/data/mpd/mpd.pid" [ -f "/data/mpd/mpd.pid" ] && rm -Rf "/data/mpd/mpd.pid"
fi fi
@ -142,7 +136,6 @@ healthcheck) # Docker healthcheck
*) # Execute primary command *) # Execute primary command
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
nginx
mpd "/config/mpd/mpd.conf" mpd "/config/mpd/mpd.conf"
navidrome --configfile "/config/navidrome/navidrome.toml" navidrome --configfile "/config/navidrome/navidrome.toml"
else else

View File

@ -2,9 +2,9 @@ MusicFolder = "/data/music"
PlaylistsPath = "/data/playlists:**/**" PlaylistsPath = "/data/playlists:**/**"
DataFolder = "/data/navidrome" DataFolder = "/data/navidrome"
ScanSchedule = "@every 360m" ScanSchedule = "@every 360m"
BaseUrl = "/" BaseUrl = ""
Address = "127.0.0.1" Address = "0.0.0.0"
Port = 4533 Port = 80
EnableTranscodingConfig = true EnableTranscodingConfig = true
TranscodingCacheSize = "500MB" TranscodingCacheSize = "500MB"
ImageCacheSize = "100MB" ImageCacheSize = "100MB"

View File

@ -1,16 +0,0 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
location / {
# replace local-address with your navidrome server's IP
proxy_pass http://127.0.0.1:4533/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_buffering off;
}
}