From 11aa0dc702308f872cd86cab9fe16277a7e782a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20Christina=20Na=C3=9F?= Date: Thu, 9 Apr 2026 13:31:48 +0200 Subject: [PATCH] better configuration --- Dockerfile | 21 ++++++++++++++------- web/index.html | 12 +++++------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index f26e528..1b77a20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,18 +20,25 @@ EXPOSE 80 WORKDIR /opt/websockify -ENV LOCALPORT="80" +ENV WSHOST="window.location.hostname" +ENV WSPORT="80" ENV DEST="box.imzadi.de:23" ENV OPTS="--web /web" RUN cat <<'EOF' > /entrypoint.sh #!/bin/sh -echo "Websockify" -echo "----------" -echo "Options : $OPTS" -echo "Local Port : $LOCALPORT" -echo "Destination: $DEST" -/usr/local/bin/websockify $OPTS $LOCALPORT $DEST +echo "Websockify Container" +echo "--------------------" +echo "Container Host : $WSHOST" +echo "Container Port : $WSPORT" +echo "Destination : $DEST" +echo "Options : $OPTS" +/usr/local/bin/websockify $OPTS 80 $DEST +EOF + +RUN cat <<'EOF' > /web/config.js +var wshost=$WSHOST; +var wsport=$WSPORT; EOF RUN chmod +x /entrypoint.sh diff --git a/web/index.html b/web/index.html index 9c98d03..cd2bb0b 100644 --- a/web/index.html +++ b/web/index.html @@ -12,15 +12,11 @@
+