Merge pull request #17 from linuxserver/3.17

This commit is contained in:
Adam 2023-02-17 16:06:07 +00:00 committed by GitHub
commit 02fdedfbe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 48 additions and 75 deletions

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.17
# set version label
ARG BUILD_DATE
@ -10,10 +12,6 @@ LABEL maintainer="chbmb"
ENV HOME="/config"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
curl \
git && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
nodejs \
@ -33,14 +31,13 @@ RUN \
/tmp/mstream.tar.gz -C \
/opt/mstream/ --strip-components=1 && \
cd /opt/mstream && \
npm install --only=production && \
npm install --omit=dev && \
npm link && \
echo "**** cleanup ****" && \
npm cache clean --force && \
rm -rf /opt/mstream/save/sync && \
rm -rf /config/.npm && \
ln -s /config/sync /opt/mstream/save/sync && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
@ -49,4 +46,4 @@ COPY root/ /
# ports and volumes
EXPOSE 3000
VOLUME /config /music
VOLUME /config

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17
# set version label
ARG BUILD_DATE
@ -10,10 +12,6 @@ LABEL maintainer="chbmb"
ENV HOME="/config"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
curl \
git && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
nodejs \
@ -29,18 +27,17 @@ RUN \
curl -o \
/tmp/mstream.tar.gz -L \
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
tar xf \
tar xzf \
/tmp/mstream.tar.gz -C \
/opt/mstream/ --strip-components=1 && \
cd /opt/mstream && \
npm install --only=production && \
npm install --omit=dev && \
npm link && \
echo "**** cleanup ****" && \
npm cache clean --force && \
rm -rf /opt/mstream/save/sync && \
rm -rf /config/.npm && \
ln -s /config/sync /opt/mstream/save/sync && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
@ -49,4 +46,4 @@ COPY root/ /
# ports and volumes
EXPOSE 3000
VOLUME /config /music
VOLUME /config

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17
# set version label
ARG BUILD_DATE
@ -10,10 +12,6 @@ LABEL maintainer="chbmb"
ENV HOME="/config"
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
curl \
git && \
echo "**** install runtime packages ****" && \
apk add --no-cache --upgrade \
nodejs \
@ -29,18 +27,17 @@ RUN \
curl -o \
/tmp/mstream.tar.gz -L \
"https://github.com/IrosTheBeggar/mStream/archive/${MSTREAM_RELEASE}.tar.gz" && \
tar xf \
tar xzf \
/tmp/mstream.tar.gz -C \
/opt/mstream/ --strip-components=1 && \
cd /opt/mstream && \
npm install --only=production && \
npm install --omit=dev && \
npm link && \
echo "**** cleanup ****" && \
npm cache clean --force && \
rm -rf /opt/mstream/save/sync && \
rm -rf /config/.npm && \
ln -s /config/sync /opt/mstream/save/sync && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
@ -49,4 +46,4 @@ COPY root/ /
# ports and volumes
EXPOSE 3000
VOLUME /config /music
VOLUME /config

View File

@ -232,6 +232,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **13.02.23:** - Rebase to Alpine 3.17, migrate to s6v3.
* **05.04.22:** - Move `sync` folder to `/config`.
* **02.04.22:** - Rebase to alpine 3.15. Fix ffmpeg download.
* **17.05.21:** - Deprecating the env vars `USER`, `PASSWORD` and `USE_JSON` as mStream v5 requires the use of `config.json`.

View File

@ -1,5 +1,5 @@
---
# jenkins variables
# jenkins variables
project_name: docker-mstream
external_type: github_stable
release_type: stable
@ -25,4 +25,4 @@ repo_vars:
- CI_DELAY='120'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_WEBPATH=''
- CI_WEBPATH=''

View File

@ -37,6 +37,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3." }
- { date: "05.04.22:", desc: "Move `sync` folder to `/config`." }
- { date: "02.04.22:", desc: "Rebase to alpine 3.15. Fix ffmpeg download." }
- { date: "17.05.21:", desc: "Deprecating the env vars `USER`, `PASSWORD` and `USE_JSON` as mStream v5 requires the use of `config.json`." }

View File

@ -1,12 +0,0 @@
#!/usr/bin/with-contenv bash
# make our folders
[[ ! -d /config/keys ]] && \
mkdir -p \
/config/keys
# create keys
[[ ! -e /config/keys/certificate.pem ]] && \
openssl req -x509 -nodes -days 3650 \
-newkey rsa:2048 -keyout /config/keys/private-key.pem -out /config/keys/certificate.pem \
-subj "/CN=mstream"

View File

@ -1,33 +1,20 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# make folders
mkdir -p \
/config/{album-art,db,logs,sync}
/config/{album-art,db,keys,logs,sync} \
/music
# create keys
if [[ ! -e /config/keys/certificate.pem ]]; then
openssl req -x509 -nodes -days 3650 \
-newkey rsa:2048 -keyout /config/keys/private-key.pem -out /config/keys/certificate.pem \
-subj "/CN=mstream"
fi
# copy config.json if doesn't exist
[[ ! -e /config/config.json ]] && \
if [[ ! -e /config/config.json ]]; then
cp /defaults/config.json /config/config.json
# Backwards compatibility notice
if [ -n "$USER" ] || [ -n "$PASSWORD" ] || [ -n "$USE_JSON" ]; then
echo '
*************************************
*************************************
**** ****
**** $USER, $PASSWORD and ****
**** ****
**** $USE_JSON env vars are ****
**** ****
**** deprecated. ****
**** ****
**** Please edit config.json ****
**** ****
**** or use the web ui to ****
**** ****
**** modify the settings. ****
**** ****
*************************************
*************************************'
fi
if grep -q '"webAppDirectory": "public"' /config/config.json; then
@ -52,7 +39,6 @@ if grep -q '"webAppDirectory": "public"' /config/config.json; then
fi
# permissions
chown abc:abc -R \
lsiown -R abc:abc \
/config \
/opt/mstream/bin

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-mstream-config/run

View File

@ -0,0 +1 @@
3

View File

@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
PORT=$(jq -r '.port' /config/config.json)
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
cd /opt/mstream s6-setuidgid abc mstream -j /config/config.json

View File

@ -0,0 +1 @@
longrun

View File

@ -1,6 +0,0 @@
#!/usr/bin/with-contenv bash
cd /opt/mstream || exit
exec \
s6-setuidgid abc mstream -j /config/config.json