commit c42f504220425bab96741837d3f3976387770d13 Author: Brandon Date: Fri Aug 16 17:12:59 2019 -0500 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2783d21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +FROM jfloff/alpine-python:2.7 +MAINTAINER Log1x + +USER mopidy +ENV PGID=1000 PUID=1000 +WORKDIR /mopidy-iris + +RUN \ + echo "* Installing Runtime Packages" \ + && echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ + && apk add --no-cache \ + gst-plugins-good \ + gst-plugins-ugly \ + py2-gst \ + su-exec@commuedge \ + tini@commuedge \ + && pip instatall -U \ + pyopenssl \ + youtube-dl \ + && echo "* Installing Mopidy + Extensions" \ + && pip install -U \ + Mopidy \ + Mopidy-SoundCloud \ + Mopidy-Spotify \ + 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 sudo,mopidy -u ${PUID} mopidy \ + && echo "* Fixing privileges" \ + && chown -R mopidy:mopidy /data \ + && echo "* Ready to start Mopidy" \ + && sleep 10 + +COPY mopidy.conf /config/mopidy.conf +COPY run.sh /usr/local/bin/run.sh +RUN chmod +x /usr/local/bin/run.sh +EXPOSE 6600 6680 5555/udp +VOLUME ["/music", "/data"] + +LABEL description "Open source media server" + +CMD ["/sbin/tini", "--", "run.sh"] diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..ea7da0e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Brandon Nifong + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..34cacff --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Mopidy + Iris Alpine Docker Image + +[Iris](https://github.com/jaedb/Iris) (formerly known as Spotmop) is an extension for the Mopidy music server. With support for Spotify, LastFM, Snapcast, Icecast and many other extensions, Iris is the software that brings all your music into one user-friendly and unified interface. + +## Usage + +```bash +$ docker run -d \ + -p 6600:6600 \ + -p 6680:6680 \ + -p 5555:5555/udp \ + --name= \ + -v :/data \ + -v :/music \ + -v :/playlists \ + log1x/mopidy-iris +``` + +**Iris (Web UI):** `http://:6680` + +## Bug Reports + +If you discover a bug in docker-mopidy-iris, please [open an issue](https://github.com/log1x/docker-mopidy-iris/issues). + +## Contributing + +Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated. + +## License + +docker-mopidy-iris is provided under the [MIT License](https://github.com/log1x/docker-mopidy-iris/blob/master/LICENSE.md). diff --git a/mopidy.conf b/mopidy.conf new file mode 100755 index 0000000..3ac8550 --- /dev/null +++ b/mopidy.conf @@ -0,0 +1,21 @@ +[core] +data_dir = /data + +[local] +library = images +media_dir = /music + +[local-images] +library = sqlite + +[audio] +output = tee name=t ! queue ! autoaudiosink t. ! queue ! udpsink host=0.0.0.0 port=5555 + +[m3u] +playlists_dir = /playlists + +[http] +hostname = 0.0.0.0 + +[mpd] +hostname = 0.0.0.0 diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..c812b0c --- /dev/null +++ b/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh +function stop() { + kill $PID +} + +trap stop HUP INT TERM +su-exec mopidy mopidy --config "/data/config/mopidy.conf" "${@}" & +PID=$! +wait $PID