This commit is contained in:
Brandon
2019-08-18 05:40:08 -05:00
parent 72e4bf9d01
commit b30b5ca3cd
2 changed files with 12 additions and 4 deletions

View File

@@ -30,11 +30,18 @@ RUN \
&& echo "* Installing Mopidy + Extensions" \
&& pip install -U \
Mopidy \
Mopidy-Iris \
Mopidy-SoundCloud \
Mopidy-YouTube \
Mopidy-Local-Images \
Mopidy-Local-SQLite \
&& echo "* Installing Iris" \
&& pip install -U Mopidy-Iris \
&& echo "* Creating Mopidy User" \
&& addgroup -g ${PGID} mopidy \
&& adduser -h /mopidy -s /bin/sh -D -G mopidy -u ${PUID} mopidy \
&& echo "* Fixing privileges" \
&& mkdir -p /data \
&& chown -R mopidy:mopidy /data \
&& echo "* Ready to start Mopidy" \
&& sleep 10
@@ -46,4 +53,4 @@ VOLUME ["/music", "/data"]
LABEL description "Open source media server"
CMD ["/sbin/tini", "--", "mopidy --config '/data/config/mopidy.conf'"]
CMD ["run.sh"]

5
run.sh
View File

@@ -1,9 +1,10 @@
#!/bin/sh
function stop() {
kill $PID
kill $PID
}
trap stop HUP INT TERM
su-exec mopidy mopidy --config "/data/config/mopidy.conf" "${@}" &
su-exec mopidy mopidy --config "${MOPIDY_CONFIG_FILE}" "${@}" &
PID=$!
wait $PID