Maint: Fix websockets temporarily

This commit is contained in:
Henning Bocklage 2021-06-30 19:53:14 +02:00
parent 0a580acd36
commit fcd4a5261a
4 changed files with 21 additions and 2 deletions

View File

@ -1,4 +1,6 @@
# Changelog
## 2021-06-30
- Added Environment Variable "REVERSEPROXY" as a temporary fix until the websocket topic is fixed in the code
## 2021-06-28
- Full rework of the latest by promoting the next gen version to current after the python version is permanently broken now
- Aside from the serverwide-arl, everything should work for now. As soon as that feature is available in the source, I will update the container with that functionality again.

View File

@ -28,9 +28,9 @@ RUN git clone https://gitlab.com/RemixDev/deemix-gui.git --recursive && \
ln -sf /deemix-gui/server/music /downloads && \
ln -sf /deem/.config/deemix /config
WORKDIR /deemix-gui/server
WORKDIR /deemix-gui
RUN yarn install
RUN yarn install --prod
COPY root/ /

View File

@ -6,6 +6,11 @@ See this link for more information and also a workaround: https://docs.linuxserv
I have successfully used option 3.
# IMPORTANT - Temporary Reverse Proxy fix
If you use a reverse proxy like traefik or nginx, create an environment Variable called "REVERSEPROXY" and set it to "true".
Until it is fixed, you will have to choose to either have Deemix available through Reverse Proxy or not.
# deemix-docker
Deemix in a Docker container.
@ -58,6 +63,7 @@ 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 REVERSEPROXY=true` | OPTIONAL: Set this if you want to use Deemix behind traefik/nginx. Read the note. |
| `-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 |

View File

@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bash
# see if the environment variable for reverse proxy is set and then change the websocket to a secure websocket
if [ ! -z ${REVERSEPROXY} ]; then
printf '[cont-init.d] Fixing Websocket for Reverse Proxy \n'
sed -i 's+ws://+wss://+g' /deemix-gui/webui/public/js/bundle.js
printf '[cont-init.d] Fixed Websocket for Reverse Proxy \n'
else
printf '[cont-init.d] No Reverse Proxy enabled, keeping insecure websocket \n'
fi