Upgrade to Mopidy 3
This commit is contained in:
@@ -1 +1 @@
|
||||
test-data/
|
||||
data/
|
||||
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
data/
|
||||
accounts.conf
|
||||
40
.gitlab-ci.yml
Normal file
40
.gitlab-ci.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
docker-master:
|
||||
image: docker:latest
|
||||
stage: build
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
|
||||
- docker push "$CI_REGISTRY_IMAGE"
|
||||
only:
|
||||
- master
|
||||
|
||||
docker-tag:
|
||||
image: docker:latest
|
||||
stage: build
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" .
|
||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
|
||||
only:
|
||||
- tags
|
||||
|
||||
|
||||
docker:
|
||||
image: docker:latest
|
||||
stage: build
|
||||
services:
|
||||
- docker:dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||
except:
|
||||
- master
|
||||
|
||||
43
Dockerfile
43
Dockerfile
@@ -1,5 +1,14 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Wouter Habets (wouterhabets@gmail.com)
|
||||
FROM debian:buster
|
||||
LABEL maintainer="wouter@habets.io"
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
git \
|
||||
gstreamer1.0-libav \
|
||||
python-crypto \
|
||||
python-setuptools
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
@@ -10,27 +19,18 @@ RUN apt-get update \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
mopidy \
|
||||
mopidy-mpd \
|
||||
mopidy-local \
|
||||
mopidy-scrobbler \
|
||||
mopidy-soundcloud \
|
||||
mopidy-spotify \
|
||||
mopidy-spotify-tunigo \
|
||||
mopidy-tunein \
|
||||
git \
|
||||
gstreamer1.0-libav \
|
||||
python-crypto \
|
||||
python-setuptools
|
||||
mopidy-tunein
|
||||
|
||||
RUN curl -L https://bootstrap.pypa.io/get-pip.py | python -
|
||||
RUN pip install --ignore-installed Mopidy-Iris
|
||||
RUN pip install -U six \
|
||||
&& pip install markerlib \
|
||||
&& pip install Mopidy-Local-SQLite \
|
||||
&& pip install Mopidy-Local-Images \
|
||||
&& pip install Mopidy-Party \
|
||||
&& pip install Mopidy-Simple-Webclient \
|
||||
&& pip install Mopidy-MusicBox-Webclient \
|
||||
&& pip install Mopidy-API-Explorer \
|
||||
&& pip install Mopidy-Mopify
|
||||
#RUN curl -L https://bootstrap.pypa.io/get-pip.py | python3 -
|
||||
RUN python3 -m pip install \
|
||||
Mopidy-Iris \
|
||||
Mopidy-MusicBox-Webclient \
|
||||
Mopidy-YouTube
|
||||
|
||||
#ADD snapserver.deb /tmp/snapserver.deb
|
||||
#RUN apt-get install -y libavahi-client3 libavahi-common3 \
|
||||
@@ -49,8 +49,6 @@ ADD localscan /usr/bin/localscan
|
||||
RUN chmod +x /usr/bin/localscan
|
||||
|
||||
VOLUME /var/lib/mopidy
|
||||
VOLUME /media
|
||||
VOLUME /mopidy.conf
|
||||
|
||||
EXPOSE 6600
|
||||
EXPOSE 6680
|
||||
@@ -59,4 +57,5 @@ EXPOSE 6681
|
||||
USER mopidy
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["/usr/bin/mopidy"]
|
||||
CMD ["/usr/bin/mopidy", "--config", "/etc/mopidy.conf:/mopidy.conf"]
|
||||
|
||||
|
||||
18
README.md
18
README.md
@@ -1,23 +1,17 @@
|
||||
# Mopidy Docker image
|
||||
Image for running [Mopidy](https://www.mopidy.com/) in Docker.
|
||||
Image for running [Mopidy](https://www.mopidy.com/) in Docker.
|
||||
Uses Pulseaudio for audio output.
|
||||
|
||||
## Contents
|
||||
### Frontend extensions
|
||||
* [Iris](https://github.com/jaedb/Iris)
|
||||
* [Mopidy Musicbox Webclient](https://github.com/pimusicbox/mopidy-musicbox-webclient)
|
||||
* [Mopidy Party](https://github.com/Lesterpig/mopidy-party)
|
||||
* [Mopidy Simple webclient](https://github.com/xolox/mopidy-simple-webclient)
|
||||
* [API explorer](https://github.com/dz0ny/mopidy-api-explorer)
|
||||
* [Local images](https://github.com/tkem/mopidy-local-images)
|
||||
|
||||
### Backend extensions
|
||||
* Spotify
|
||||
* Spotify tunigo
|
||||
* Soundcloud
|
||||
* Scrobbler
|
||||
* Tunein
|
||||
* Local SQLite
|
||||
|
||||
## How to use
|
||||
```bash
|
||||
@@ -46,6 +40,10 @@ To add Spotify, Last.FM etc. accounts, use the `/mopidy.conf` file. Example:
|
||||
enabled = true
|
||||
username =
|
||||
password =
|
||||
client_id =
|
||||
client_secret =
|
||||
# To authenticate go to:
|
||||
# https://mopidy.com/ext/spotify/#authentication
|
||||
|
||||
[scrobbler]
|
||||
enabled = true
|
||||
@@ -65,14 +63,14 @@ enable = true
|
||||
The complete default config can be found in the file [mopidy.conf](./mopidy.conf)
|
||||
|
||||
## Local media
|
||||
To play local media files, mount `/media`. All meta data will be stored using Mopidy-Local-SQLite. To scan for new media files, run `docker exec -it mopidy localscan`.
|
||||
To play local media files, mount `/media`. To scan for new media files, run `docker exec -it mopidy localscan`.
|
||||
|
||||
## Adding extensions
|
||||
To add extensions, I advice to override this image by creating your own Dockerfile.
|
||||
In the example below, the material webclient is added. To add packages, we switch to the root user, run `pip` to add everything we need and switch back to the `mopidy` user.
|
||||
In the example below, a package is installed with pip. To add packages, we switch to the root user, run `pip` to add everything we need and switch back to the `mopidy` user.
|
||||
```Dockerfile
|
||||
FROM whhoesj/mopidy:latest
|
||||
USER root
|
||||
RUN pip install
|
||||
RUN python3 -m pip install <your-package>
|
||||
USER mopidy
|
||||
```
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "WARNING. Mopidy-Youtube is removed."
|
||||
echo "There are a lot of issues with it and there is currently no maintainer."
|
||||
echo "I'll add it back once there is a mainainer found for the package."
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Starting container..."
|
||||
echo "Current user: $(whoami)"
|
||||
echo "Current user id: $(id -u $(whoami))"
|
||||
cd ~
|
||||
echo $PWD
|
||||
ls -lsa
|
||||
echo ""
|
||||
echo ""
|
||||
exec /usr/bin/mopidy --config /etc/mopidy.conf:/mopidy.conf
|
||||
exec $@
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#! /bin/bash
|
||||
/usr/bin/mopidy --config /etc/mopidy.conf:/mopidy.conf local scan
|
||||
/usr/bin/mopidy --config /etc/mopidy.conf:/mopidy.conf local scan
|
||||
|
||||
19
mopidy.conf
19
mopidy.conf
@@ -45,22 +45,3 @@ protocols =
|
||||
rtmps
|
||||
rtsp
|
||||
|
||||
[spotify]
|
||||
enabled = false
|
||||
bitrate = 320
|
||||
|
||||
[spotify_tunigo]
|
||||
enabled = true
|
||||
region = all
|
||||
|
||||
[tunein]
|
||||
enabled = false
|
||||
|
||||
[soundcloud]
|
||||
enabled = false
|
||||
|
||||
[scrobbler]
|
||||
enabled = false
|
||||
|
||||
[musicbox_webclient]
|
||||
#on_track_click = PLAY_NOW
|
||||
|
||||
6
test.sh
6
test.sh
@@ -2,9 +2,9 @@
|
||||
docker run \
|
||||
--rm \
|
||||
--name mopidy \
|
||||
-e PULSE_SERVER=tcp:10.10.10.10:4713 \
|
||||
-v /home/wouter/Muziek/Spotify:/media:ro \
|
||||
-v $PWD/test-data:/var/lib/mopidy \
|
||||
-e PULSE_SERVER=tcp:10.10.10.14:4713 \
|
||||
-v /home/wouter/Muziek:/media:ro \
|
||||
-v $PWD/data:/var/lib/mopidy \
|
||||
-v $PWD/accounts.conf:/mopidy.conf \
|
||||
-p 6600:6600 \
|
||||
-p 6680:6680 \
|
||||
|
||||
Reference in New Issue
Block a user