Compare commits
3
Commits
main
..
d0d2a24543
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0d2a24543 | ||
|
|
8b7c3d2b99 | ||
|
|
2557834bda |
No files matched your search
+44
@@ -0,0 +1,44 @@
|
||||
#ARG BUILD_FROM=docker.io/arm32v7/debian:trixie-slim
|
||||
ARG BUILD_FROM=debian:trixie-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
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 \
|
||||
python3-venv \
|
||||
libasound2-dev \
|
||||
libcairo2-dev \
|
||||
libgirepository-2.0-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
RUN python3 -m venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
RUN python3 -m pip install -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"]
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
https://gist.github.com/hoegaarden/5bf5fe4328b5eacd217658f674667b48
|
||||
|
||||
https://oneuptime.com/blog/post/2026-03-16-install-podman-raspberry-pi/view
|
||||
|
||||
|
||||
install raspberry pi OS:
|
||||
https://www.raspberrypi.com/documentation/computers/getting-started.html#imager-install
|
||||
|
||||
remove raspbi desktop environment
|
||||
```
|
||||
sudo apt purge xserver* lightdm* raspberrypi-ui-mods vlc* lxde* chromium* desktop* gnome* gstreamer* gtk* hicolor-icon-theme* lx* mesa*
|
||||
sudo apt autoremove
|
||||
```
|
||||
|
||||
```
|
||||
7 sudo apt install -y podman
|
||||
8 sudo apt install -y slirp4netns uidmap fuse-overlayfs
|
||||
9 podman --version
|
||||
10 podman info | grep -i arch
|
||||
11 podman info
|
||||
12 grep $(whoami) /etc/subuid
|
||||
13 grep $(whoami) /etc/subgid
|
||||
14 mkdir -p ~/.config/containers
|
||||
15 cat > ~/.config/containers/storage.conf <<EOF
|
||||
[storage]
|
||||
driver = "overlay"
|
||||
|
||||
[storage.options.overlay]
|
||||
mount_program = "/usr/bin/fuse-overlayfs"
|
||||
EOF
|
||||
|
||||
16 cat ~/.config/containers/storage.conf
|
||||
17 podman run --rm docker.io/library/hello-world
|
||||
18 podman run --rm -it docker.io/library/alpine:latest uname -m
|
||||
19 podman system prune -a
|
||||
```
|
||||
|
||||
https://oneuptime.com/blog/post/2026-03-18-use-audio-devices-podman-containers/view
|
||||
|
||||
|
||||
podman create --name mopidy --device /dev/snd:/dev/snd --group-add keep-groups -v "$(pwd)/mopidy.conf:/root/.config/mopidy/mopidy.conf:ro" -p 6600:6600 -p 6680:6680 mopidy
|
||||
cat > ~/.config/containers/systemd/mopidy.container <<EOF
|
||||
[Unit]
|
||||
Description=Mopidy music server
|
||||
|
||||
[Container]
|
||||
ContainerName=mopidy
|
||||
Image=mopidy
|
||||
PublishPort=6600:6600
|
||||
PublishPort=6680:6680
|
||||
Volume=/home/nine/mopidy/mopidy.conf:/root/.config/mopidy/mopidy.conf:ro
|
||||
GroupAdd=keep-groups
|
||||
AddDevice=/dev/snd
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user start mopidy.service
|
||||
systemctl --user status mopidy.service
|
||||
|
||||
## Start it at boot, even when you're not logged in
|
||||
sudo loginctl enable-linger "$USER"
|
||||
|
||||
Executable
+37
@@ -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
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,28 @@
|
||||
# https://github.com/mopidy/mopidy/releases
|
||||
Mopidy==4.0.5
|
||||
|
||||
# https://github.com/mopidy/mopidy-mpd/releases
|
||||
Mopidy-MPD==4.0.1
|
||||
|
||||
# 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==3.0.0
|
||||
|
||||
# https://github.com/natumbri/mopidy-youtube
|
||||
Mopidy-Youtube==4.0.2
|
||||
yt-dlp
|
||||
|
||||
# https://github.com/Lesterpig/mopidy-party
|
||||
Mopidy-Party==1.3.0
|
||||
|
||||
# https://github.com/sapristi/mopidy-mowecl
|
||||
Mopidy-Mowecl==0.6.1
|
||||
pylast
|
||||
Reference in new issue
Block a user