mirror of
https://github.com/casjaysdevdocker/navidrome
synced 2025-01-18 06:34:27 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
ca8c0a4f0f
commit
ef1884fa17
10
Dockerfile
10
Dockerfile
@ -1,5 +1,7 @@
|
||||
FROM casjaysdevdocker/alpine:latest as build
|
||||
|
||||
ARG alpine_version=edge
|
||||
|
||||
ARG LICENSE=WTFPL \
|
||||
IMAGE_NAME=music \
|
||||
TIMEZONE=America/New_York \
|
||||
@ -12,11 +14,11 @@ ENV SHELL=/bin/bash \
|
||||
|
||||
RUN mkdir -p /bin/ /config/ /data/ && \
|
||||
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/edge/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/main" >> /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 && \
|
||||
apk update -U --no-cache && \
|
||||
apk add mpd navidrome nginx
|
||||
apk add --no-cache mpd navidrome
|
||||
|
||||
COPY ./bin/. /usr/local/bin/
|
||||
COPY ./config/. /etc/
|
||||
|
@ -101,17 +101,11 @@ fi
|
||||
[ -d "/data/playlists" ] || mkdir -p "/data/playlists"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -d "/config/mpd" ] || mkdir -p "/config/mpd"
|
||||
[ -d "/config/nginx" ] || mkdir -p "/config/nginx"
|
||||
[ -d "/config/navidrome" ] || mkdir -p "/config/navidrome"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
[ -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"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
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
|
||||
[ -f "/data/mpd/mpd.pid" ] && rm -Rf "/data/mpd/mpd.pid"
|
||||
fi
|
||||
@ -142,7 +136,6 @@ healthcheck) # Docker healthcheck
|
||||
|
||||
*) # Execute primary command
|
||||
if [ $# -eq 0 ]; then
|
||||
nginx
|
||||
mpd "/config/mpd/mpd.conf"
|
||||
navidrome --configfile "/config/navidrome/navidrome.toml"
|
||||
else
|
||||
|
@ -2,9 +2,9 @@ MusicFolder = "/data/music"
|
||||
PlaylistsPath = "/data/playlists:**/**"
|
||||
DataFolder = "/data/navidrome"
|
||||
ScanSchedule = "@every 360m"
|
||||
BaseUrl = "/"
|
||||
Address = "127.0.0.1"
|
||||
Port = 4533
|
||||
BaseUrl = ""
|
||||
Address = "0.0.0.0"
|
||||
Port = 80
|
||||
EnableTranscodingConfig = true
|
||||
TranscodingCacheSize = "500MB"
|
||||
ImageCacheSize = "100MB"
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user