diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..210697f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "templates/docker-compose/mopidy"] + path = templates/docker-compose/mopidy + url = git@github.com:Log1x/docker-mopidy-iris.git diff --git a/snackpot.yml b/snackpot.yml index 84fc7be..9026c80 100644 --- a/snackpot.yml +++ b/snackpot.yml @@ -18,9 +18,18 @@ - "80" - "443" # minidlna + - "8200" + # upmpdcli + - port: "49152" + # upnp (minidlna and upmpdcli) - proto: udp port: "1900" - - "8200" + # mopidy + - "6600" + - "6680" + - "5555" + # icecast + - "8000" tasks: - hostname: diff --git a/templates/docker-compose/docker-compose.yml b/templates/docker-compose/docker-compose.yml index 3dbc99d..081deae 100644 --- a/templates/docker-compose/docker-compose.yml +++ b/templates/docker-compose/docker-compose.yml @@ -14,6 +14,7 @@ volumes: redis: minidlna_state: minidlna_data: + mopidy_data: networks: proxy-tier: @@ -127,3 +128,88 @@ services: - MINIDLNA_MEDIA_DIR_1=A,/media/audio - MINIDLNA_MEDIA_DIR_2=V,/media/video - MINIDLNA_FRIENDLY_NAME=Snackpot + + mopidy: + build: ./mopidy + ports: + - "6600:6600" + - "6680:6680" + - "8000:8000" + volumes: + # Makes mopidy data persistent + - mopidy_data:/data + # Add local music folder + - minidlna_data:/music:ro + restart: unless-stopped + + upmpdcli: + build: ./upmpdcli + depends_on: + - mopidy + # Host mode needed for advertisement + network_mode: host + + # Next three services adapted from +# https://github.com/deisi/audiostation/blob/master/docker-compose.yml +# and https://github.com/IVData/dockerfiles/blob/master/mopidy-multiroom/docker-compose.yml + +# snapserver: +# image: ivdata/snapserver:latest +# # ports: +# # - "1704:1704" +# # - "1705:1705" +# # - "1780:1780" +# volumes: +# # The volume with the sharesound fifo for snapcast to work +# - fifo:/tmp/snapcast +# # command: "snapserver -s pipe:///tmp/sharesound/snapfifo?name=Radio" +# # host mode is needed for snapserver advertisement +# network_mode: host +# restart: unless-stopped + +# snapclient: +# image: ivdata/snapclient:latest +# # ports: +# # - "1704:1704" +# # - "1705:1705" +# # - "1780:1780" +# devices: +# - /dev/snd +# volumes: +# # The volume with the sharesound fifo for snapcast to work +# - fifo:/tmp/snapcast +# # command: "snapserver -s pipe:///tmp/sharesound/snapfifo?name=Radio" +# # host mode is needed for snapserver advertisement +# network_mode: host +# restart: unless-stopped +# environment: +# - HOST=127.0.0.1 + + # mopidy: + # image: ivdata/mopidy:latest + # ports: + # - "6600:6600" + # - "6680:6680" + # - "5555:5555" + # depends_on: + # - snapserver + # volumes: + # # The volume with the fifo for snapcast to work with + # - fifo:/tmp/snapcast + # # Makes mopidy data persistent + # - mopidy_data:/mopidy + # # Add local music folder + # - minidlna_data:/media/music:ro + # restart: unless-stopped + +# spotify: +# image: audiostation/spotify:latest +# # host mode is needed for Spotifyd advertisement +# network_mode: host +# depends_on: +# - snapserver +# volumes: +# # The volume with the sharesound fifo for snapcast to work +# - /tmp/sharesound:/tmp/sharesound +# restart: unless-stopped + diff --git a/templates/docker-compose/mopidy b/templates/docker-compose/mopidy new file mode 160000 index 0000000..3ba2b8c --- /dev/null +++ b/templates/docker-compose/mopidy @@ -0,0 +1 @@ +Subproject commit 3ba2b8c06f8ef3213d6f7b3c3dc840fffe8808a0 diff --git a/templates/docker-compose/upmpdcli/Dockerfile b/templates/docker-compose/upmpdcli/Dockerfile new file mode 100644 index 0000000..7ae3ae8 --- /dev/null +++ b/templates/docker-compose/upmpdcli/Dockerfile @@ -0,0 +1,16 @@ +FROM alpine:3.13 + +RUN apk update \ + && apk upgrade \ + && apk add --no-cache \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + python2 \ + upmpdcli + +COPY upmpdcli.conf /etc/upmpdcli.conf +#RUN adduser -S upmpdcli + +EXPOSE 1900/udp +EXPOSE 49152 + +ENTRYPOINT ["upmpdcli"] diff --git a/templates/docker-compose/upmpdcli/upmpdcli.conf b/templates/docker-compose/upmpdcli/upmpdcli.conf new file mode 100644 index 0000000..228f1c4 --- /dev/null +++ b/templates/docker-compose/upmpdcli/upmpdcli.conf @@ -0,0 +1,28 @@ +# upmpdcli general parameters +#logfilename = /var/log/upmpdcli.log +# loglevel = 0 +#pkgdatadir=/usr/share/upmpdcli +#pidfile = /var/run/upmpdcli.pid + +# upnp network parameters +#upnpiface = +#upnpip = +# upnpport = + +# media renderer parameters +friendlyname = Snackpot +#upnpav = 1 +#openhome = 1 +#lumincompat = 0 +#saveohcredentials = 1 +#checkcontentformat = 1 +#iconpath = /usr/share/upmpdcli/icon.png +#cachedir = /var/cache/upmpdcli +#presentationhtml = /usr/share/upmpdcli/presentation.html + +# mpd parameters +#mpdhost = 127.0.0.1 +#mpdport = 6600 +#mpdpassword = +#ownqueue = 1 +