From 340f58587f6eec4f0f5995a70ed5a25fd8c01bcc Mon Sep 17 00:00:00 2001 From: Henning Bocklage Date: Fri, 11 Mar 2022 00:00:19 +0100 Subject: [PATCH] Add Single_User mode --- CHANGELOG.md | 3 +++ Dockerfile | 8 ++------ README.md | 11 ++++++++++- root/etc/services.d/deemix/run | 6 ++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1889c09..f9b3684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## 2022-03-10 +- Completely reworked image. The gitlab CI will now build all architectures and store them as packages in the repo. Those will be pulled during build. This lowers the image footprint to 37mb, down from 150. +- Re-added previous "serverwide-arl" functionality as "DEEMIX_SINGLE_USER". The readme shows how to use it. ## 2021-07-09 - Removed Environment Variable "REVERSEPROXY" again since the original issue was fixed in the webui source. Reverse proxying should now just work by default. ## 2021-06-30 diff --git a/Dockerfile b/Dockerfile index f3cd950..55618cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM lsiobase/alpine:3.15 -#Add addiitional packages -RUN apk add --no-cache curl + +RUN apk add --no-cache curl jq ARG TARGETARCH ARG STATIC_URL ARG BUILDDATE @@ -13,10 +13,6 @@ LABEL \ app.deemix.image.description="Docker image for Deemix" \ maintainer="Bocki" -#RUN curl -L -o deemix.zip http://gitlab.com/Bockiii/deemix-src/-/jobs/artifacts/master/download?job=dl_src && \ -# unzip deemix - -# Need look again in project num RUN curl -L $STATIC_URL/deemix-server-linux-$TARGETARCH -o deemix-server COPY root/ / diff --git a/README.md b/README.md index a0c6272..87bc6fd 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ $ docker run -d --name Deemix \ -e PUID=1000 \ -e PGID=1000 \ -e UMASK_SET=022 \ + -e DEEMIX_SINGLE_USER=true \ -p 6595:6595 \ registry.gitlab.com/bockiii/deemix-docker ``` @@ -33,6 +34,7 @@ services: - PUID=1000 - PGID=1000 - UMASK_SET=022 + - DEEMIX_SINGLE_USER=true ports: - 6595:6595 ``` @@ -41,7 +43,7 @@ services: Pull the latest container for the latest Deemix version -### Explanation: +### Parameters: | Parameter | Function | | :----: | --- | @@ -50,12 +52,19 @@ Pull the latest container for the latest Deemix version | `-e PUID=1000` | OPTIONAL: User ID of the user you want the container to run as in order to fix folder permission issues | | `-e PGID=1000` | OPTIONAL: Group ID, see PUID | | `-e UMASK_SET=022` | OPTIONAL: Setting UMASK for file permissions Default is 022 | +| `-e DEEMIX_SINGLE_USER=true` | OPTIONAL: Similar to the ARL functionality in previous iterations. See below for details | | `-p 6595:6595` | Port opened for the web interface | | `-e INTPORT=3333` | EXTRA OPTIONAL: This changes the internal port of deemix. DON'T CHANGE THIS IF YOU DONT KNOW WHY YOU WOULD DO IT | | `registry.gitlab.com/bockiii/deemix-docker` | This container | To access the web interface, go to http://YOURSERVERIP:6595 +### DEEMIX_SINGLE_USER: + +Setting this environment variable to true will enable a serverwide login. In this mode, only one user needs to log in and every session will use the same login. You do not need to provide an ARL to the container, deemix will store the login information in the config folder. + +I also added a functionality that will enable Single_User mode when any ARL is configured at all. This will help legacy installations that still use old configuration parameters. As long as the ARL is set to anything, the mode is enabled. The provided ARL will NOT be processed, so you will need to login once using the web interface. + ## Tags `latest` : Latest state of the main branch. diff --git a/root/etc/services.d/deemix/run b/root/etc/services.d/deemix/run index 88e521e..2e63c4d 100644 --- a/root/etc/services.d/deemix/run +++ b/root/etc/services.d/deemix/run @@ -5,12 +5,18 @@ umask "$UMASK_SET" cd / +# Check if an alternative port was defined, set it to it or default if [ ! -z ${INTPORT} ]; then port=$INTPORT else port=6595 fi +# Check if the ARL environment var is set to anything. This enables legacy behavior +if [ ! -z ${ARL} ]; then + export DEEMIX_SINGLE_USER=true +fi + export DEEMIX_DATA_DIR=/config/ export DEEMIX_MUSIC_DIR=/downloads/ export DEEMIX_SERVER_PORT=$port