I created Mopidy docker image to utilize network audio server with my audio collection
Docker is hosted on OrangePi Zero mini computer. I will not cover docker configuration since it is not part of the project.
Sources can be found here
To install this as a service create file /etc/systemd/system/mopidy-docker.service with following content (please change settings where necessary)
[Unit]
Description=dockerized mopidy
Requires=docker.service
After=docker.service
[Service]
ExecStartPre=-/usr/bin/docker rm -f mopidy-instance
ExecStartPre=-/usr/bin/docker pull andreymalyshenko/mopidy:armhf
ExecStart=/usr/bin/docker run --name mopidy-instance -p 6680:6680 -p 8011:8011 -v /data2/muzlo:/media:ro -v /var/lib/mopidy:/var/lib/mopidy -e PULSE_SERVER=192.168.1.80 andreymalyshenko/mopidy:armhf
ExecStartPost=/bin/sh -c 'while ! docker ps | grep mopidy-instance ; do sleep 0.2; done'
ExecStop=/usr/bin/docker rm -f mopidy-instance
TimeoutSec=0
RemainAfterExit=no
Restart=always
[Install]
WantedBy=multi-user.target
then execute
sudo systemctl daemon-reload
sudo systemctl start mopidy-docker.service
if you see it is running OK and available at http://host:6680 enable service startup
sudo systemctl start mopidy-docker.service
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.