Skip to content

Commit 5ef872a

Browse files
committed
Merge branch 'develop'
2 parents e7d19ce + aaae821 commit 5ef872a

File tree

28 files changed

+350
-459
lines changed

28 files changed

+350
-459
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
name: ${{ matrix.name }}
5555
runs-on: ubuntu-20.04
56-
container: ghcr.io/mopidy/ci:latest
56+
container: ghcr.io/mopidy/ci:7
5757
steps:
5858
- name: Checkout code
5959
uses: actions/checkout@v2

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ RUN apt update \
3232
WORKDIR /usr/src/gst-plugins-rs
3333

3434
# Clone source of gst-plugins-rs to workdir
35-
ARG GST_PLUGINS_RS_TAG=main
35+
ARG GST_PLUGINS_RS_TAG=0.10.5
3636
RUN git clone -c advice.detachedHead=false \
3737
--single-branch --depth 1 \
3838
--branch ${GST_PLUGINS_RS_TAG} \
3939
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git ./
40-
# EXPERIMENTAL: For gstreamer-spotify set upgraded version number of dependency librespot to 0.4.2
41-
RUN sed -i 's/librespot = { version = "0.4", default-features = false }/librespot = { version = "0.4.2", default-features = false }/g' audio/spotify/Cargo.toml
4240

4341
# Build GStreamer plugins written in Rust (optional with --no-default-features)
4442
ENV DEST_DIR /target/gst-plugins-rs
@@ -99,9 +97,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
9997

10098
# Install mopidy and (optional) DLNA-server dleyna from apt.mopidy.com
10199
# see https://docs.mopidy.com/en/latest/installation/debian/
102-
RUN mkdir -p /usr/local/share/keyrings \
103-
&& wget -q -O /usr/local/share/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg \
104-
&& wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list \
100+
RUN mkdir -p /etc/apt/keyrings \
101+
&& wget -q -O /etc/apt/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg \
102+
&& wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/bullseye.list \
105103
&& apt-get update \
106104
&& apt-get install -y \
107105
mopidy \
@@ -133,7 +131,7 @@ RUN git clone --depth 1 --single-branch -b ${IRIS_VERSION} https://github.com/ja
133131

134132
# Install mopidy-spotify-gstspotify (Hack, not released yet!)
135133
# (https://github.com/kingosticks/mopidy-spotify/tree/gstspotifysrc-hack)
136-
RUN git clone --depth 1 -b gstspotifysrc-hack https://github.com/kingosticks/mopidy-spotify.git mopidy-spotify \
134+
RUN git clone --depth 1 https://github.com/mopidy/mopidy-spotify.git mopidy-spotify \
137135
&& cd mopidy-spotify \
138136
&& python3 setup.py install \
139137
&& cd .. \

Dockerfile.alpine

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Use Alpine edge for now as some required dependencies are only in the testing repository
2+
FROM alpine:edge
3+
4+
# Switch to the root user while we do our changes
5+
USER root
6+
WORKDIR /
7+
8+
# Install GStreamer and other required Debian packages
9+
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
10+
&& apk update \
11+
&& apk add \
12+
dumb-init \
13+
shadow \
14+
sudo \
15+
git \
16+
py3-pip \
17+
mopidy \
18+
py3-mopidy-spotify
19+
20+
# Install Node, to build Iris JS application
21+
RUN apk add nodejs npm
22+
23+
# Upgrade Python package manager pip
24+
# https://pypi.org/project/pip/
25+
RUN python3 -m pip install --upgrade pip
26+
27+
# Clone Iris from the repository and install in development mode.
28+
# This allows a binding at "/iris" to map to your local folder for development, rather than
29+
# installing using pip.
30+
# Note: ADD helps prevent RUN caching issues. When HEAD changes in repo, our cache will be invalidated!
31+
ADD https://api.github.com/repos/jaedb/Iris/git/refs/heads/master version.json
32+
ENV IRIS_VERSION=develop
33+
RUN git clone --depth 1 --single-branch -b ${IRIS_VERSION} https://github.com/jaedb/Iris.git /iris \
34+
&& cd /iris \
35+
&& npm install \
36+
&& npm run prod \
37+
&& python3 setup.py develop \
38+
&& mkdir -p /var/lib/mopidy/.config \
39+
&& ln -s /config /var/lib/mopidy/.config/mopidy \
40+
# Allow mopidy user to run system commands (restart, local scan, etc)
41+
&& echo "mopidy ALL=NOPASSWD: /iris/mopidy_iris/system.sh" >> /etc/sudoers \
42+
# Enable container mode (disable restart option, etc.)
43+
&& echo "1" >> /IS_CONTAINER \
44+
# Copy Version file
45+
&& cp /iris/VERSION /
46+
47+
# Install additional mopidy extensions and Python dependencies via pip
48+
COPY docker/requirements.txt .
49+
RUN python3 -m pip install -r requirements.txt
50+
51+
# Cleanup
52+
RUN rm -rf /root/.cache \
53+
&& rm -rf /iris/node_modules
54+
55+
# Start helper script.
56+
COPY docker/entrypoint.sh /entrypoint.sh
57+
58+
# Copy Default configuration for mopidy
59+
COPY docker/mopidy/mopidy.example.conf /config/mopidy.conf
60+
61+
# Copy the pulse-client configuratrion
62+
COPY docker/mopidy/pulse-client.conf /etc/pulse/client.conf
63+
64+
# Allows any user to run mopidy, but runs by default as a randomly generated UID/GID.
65+
# RUN useradd -ms /bin/bash mopidy
66+
ENV HOME=/var/lib/mopidy
67+
RUN set -ex \
68+
&& usermod -G audio,wheel mopidy \
69+
&& mkdir /var/lib/mopidy/local \
70+
&& chown mopidy:audio -R $HOME /entrypoint.sh /iris \
71+
&& chmod go+rwx -R $HOME /entrypoint.sh /iris
72+
73+
# Runs as mopidy user by default.
74+
USER mopidy:audio
75+
76+
VOLUME ["/var/lib/mopidy/local"]
77+
78+
EXPOSE 6600 6680 1704 1705 5555/udp
79+
80+
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]
81+
CMD ["mopidy"]

IRIS_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.66.1
1+
3.67.0

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ include mopidy_iris/ext.conf
77
include mopidy_iris/system.sh
88
include IRIS_VERSION
99
include Dockerfile
10+
include Dockerfile.alpine
1011
include pyproject.toml
1112
include screenshot.jpg
1213
include tox.ini

docker/entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
if [ -z "$PULSE_COOKIE_DATA" ]
44
then
5-
echo -ne $(echo $PULSE_COOKIE_DATA | sed -e 's/../\\x&/g') >$HOME/pulse.cookie
6-
export PULSE_COOKIE=$HOME/pulse.cookie
5+
printf '%s' "$(echo "$PULSE_COOKIE_DATA" | sed -e 's/../\\x&/g')" >"$HOME"/pulse.cookie
6+
export PULSE_COOKIE="$HOME"/pulse.cookie
77
fi
88

99
if [ ${PIP_PACKAGES:+x} ]; then
1010
echo "-- INSTALLING PIP PACKAGES $PIP_PACKAGES --"
11-
python3 -m pip install --no-cache $PIP_PACKAGES
11+
python3 -m pip install --no-cache --upgrade "$PIP_PACKAGES"
1212
fi
1313

1414
exec "$@"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
},
9595
"scripts": {
9696
"test": "jest",
97-
"tox": "docker exec -it -u root iris_mopidy_1 bash -c \"cd /iris && tox\"",
97+
"tox": "docker exec -it -u root mopidy bash -c \"cd /iris && tox\"",
9898
"start": "NODE_ENV=development WEBPACK_DEV_SERVER=1 webpack-dev-server",
9999
"lint": "eslint src",
100100
"lint:fix": "eslint src --fix",

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
</body>
117117
<script type="text/javascript">
118118
if ('serviceWorker' in navigator){
119-
navigator.serviceWorker.register('service-worker.js')
119+
navigator.serviceWorker.register('<%= baseHref %>service-worker.js')
120120
.then(function(registration){
121121
console.log('Service worker registered');
122122
}).catch(function(error){

src/js/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const Content = () => (
5353
<Route path="queue/history" element={<QueueHistory />}/>
5454
<Route path="settings/debug" element={<Debug />} />
5555
<Route path="settings/*" element={<Settings />} />
56-
<Route path="search/" element={<Search />} />
56+
<Route path="search" element={<Search />} />
5757
<Route path="search/:type/:term" element={<Search />} />
5858
<Route path="artist/:uri/*" element={<Artist />} />
5959
<Route path="album/:uri/" element={<Album />} />

src/js/components/ContextMenu/PlaylistSubmenu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useDispatch } from 'react-redux';
33
import { compact } from 'lodash';
44
import { I18n } from '../../locale';
55
import Link from '../Link';
6+
import Loader from '../Loader';
67
import Icon from '../Icon';
78
import { encodeUri } from '../../util/format';
89
import {

0 commit comments

Comments
 (0)