initial setup from hoegaarden at github.com

https://gist.github.com/hoegaarden/5bf5fe4328b5eacd217658f674667b48
This commit is contained in:
nine committed 2026-10-27 06:32:56 +01:00
1 parent 061e1c7303
commit 2557834bda
5 files changed
+159

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
ARG BUILD_FROM=docker.io/arm32v7/debian:bookworm-slim
FROM $BUILD_FROM
RUN apt-get update \
&& apt-get install -y wget \
gstreamer1.0-alsa \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
gstreamer1.0-plugins-bad \
python3-gst-1.0 \
python3-lxml \
python3-pip \
python3-setuptools \
python3-wheel \
libasound2-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements.txt
RUN pip3 install --break-system-packages -r requirements.txt \
&& rm -rf ~/.cache/pip
RUN update-ca-certificates --fresh
RUN mkdir /root/music
VOLUME ["/root/.cache/mopidy", "/root/.local/share/mopidy", "/root/music"]
ENV TZ=Europe/Vienna
EXPOSE 6600 6680
ENTRYPOINT ["mopidy"]
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
readonly DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd )"
readonly IMG="github.com/hoegaarden/mopidy:latest"
readonly MUSIC_DIR="/mnt/hufi"
readonly CONF="${DIR}/mopidy.conf"
readonly CACHE_DIR="${DIR}/cache"
readonly SHARE_DIR="${DIR}/share"
readonly NAME="mopidy"
main() {
build && run
}
build() {
docker build -t "${IMG}" "${DIR}"
}
run() {
docker run --rm \
--name "${NAME}" \
--device /dev/snd \
-v "${CONF}:/root/.config/mopidy/mopidy.conf:ro" \
-v "${MUSIC_DIR}:/root/music:ro" \
-v "${CACHE_DIR}:/root/.cache/mopidy" \
-v "${SHARE_DIR}:/root/.local/share/mopidy" \
-p 6600:6600 \
-p 6680:6680 \
"${IMG}"
}
main "$@"
+43
View File
@@ -0,0 +1,43 @@
[core]
cache_dir = ~/.cache/mopidy
config_dir = ~/.config/mopidy
data_dir = ~/.local/share/mopidy
restore_state = true
[logging]
color = true
[audio]
mixer = software
mixer_volume = 50
buffer_time = 2000
# Soundcard
#output = alsasink device=sysdefault:CARD=IQaudIODAC
output = alsasink device=hw:CARD=Headphones,DEV=0
# Snapcast
# output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! tcpclientsink host=127.0.0.1
[m3u]
enabled = true
# [podcast]
# enabled = true
# browse_root =
[mpd]
enabled = true
hostname = 0.0.0.0
[http]
enabled = true
hostname = 0.0.0.0
[file]
enabled = true
media_dirs = ~/music/|Music
metadata_timeout = 10000
[stream]
enabled = true
+18
View File
@@ -0,0 +1,18 @@
[Unit]
Description=Mopidy
After=docker.service
Requires=docker.service
After=mnt-stuff.mount
Requires=mnt-stuff.mount
[Service]
ExecStart=/mnt/stuff/snd/mopidy/mopidy.sh
Restart=always
RestartSec=10s
TimeoutStartSec=120
TimeoutStopSec=15
[Install]
WantedBy=multi-user.target
+27
View File
@@ -0,0 +1,27 @@
# https://github.com/mopidy/mopidy/releases
Mopidy==3.4.2
# https://github.com/mopidy/mopidy-mpd/releases
Mopidy-MPD==3.3.0
# https://github.com/impliedchaos/mopidy-bandcamp
Mopidy-Bandcamp==1.1.5
# # https://github.com/gbannerman/mopidy-pibox
# Mopidy-Pibox==3.0.6
# # https://github.com/cristianpb/muse
# Mopidy-Muse==0.0.41
# # https://github.com/mopidy/mopidy-orfradio
# mopidy-orfradio==2.3.0
# https://github.com/natumbri/mopidy-youtube
Mopidy-Youtube
# https://github.com/Lesterpig/mopidy-party
Mopidy-Party
# https://github.com/sapristi/mopidy-mowecl
Mopidy-Mowecl==0.6.1
pylast