From ac2bfe880c3df1a3315f6c420386064444056078 Mon Sep 17 00:00:00 2001 From: DanielGallo Date: Tue, 1 Oct 2024 22:30:31 +0100 Subject: [PATCH 1/3] Fix GivTCP using wrong reference to WebDashboard --- WebDashboard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebDashboard b/WebDashboard index 4dd6de5..510e5db 160000 --- a/WebDashboard +++ b/WebDashboard @@ -1 +1 @@ -Subproject commit 4dd6de564b77b0e29430446387185f0b548961d9 +Subproject commit 510e5dbf63fe80e721e11952cdc7e70f40afc832 From 5f48d03ac4b4482c4c8f12e9d9cad2ba051af76f Mon Sep 17 00:00:00 2001 From: DanielGallo Date: Tue, 1 Oct 2024 22:56:12 +0100 Subject: [PATCH 2/3] Update WebDashboard --- WebDashboard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebDashboard b/WebDashboard index 510e5db..9e39d08 160000 --- a/WebDashboard +++ b/WebDashboard @@ -1 +1 @@ -Subproject commit 510e5dbf63fe80e721e11952cdc7e70f40afc832 +Subproject commit 9e39d08a4124205848a6c57913b3e85a586d0dc9 From 88278304e06f2dac8ca731dad2619bfd7a733c34 Mon Sep 17 00:00:00 2001 From: DanielGallo Date: Tue, 1 Oct 2024 23:54:38 +0100 Subject: [PATCH 3/3] Replace npm module "serve" with "http-server" --- Dockerfile | 4 ++-- startup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index fca5042..c78aa48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add redis RUN apk add nginx RUN mkdir -p /run/nginx -RUN npm install -g serve +RUN npm install -g http-server # set the working directory in the container WORKDIR /app @@ -43,6 +43,6 @@ COPY redis.conf redis.conf COPY settings.json ./settings.json COPY ingress/ ./ingress -EXPOSE 1883 6379 8099 +EXPOSE 1883 3000 6379 8099 CMD ["python3", "/app/startup.py"] diff --git a/startup.py b/startup.py index d55c888..5651a4f 100644 --- a/startup.py +++ b/startup.py @@ -625,7 +625,7 @@ def findinv(networks): outp.write("}") WDPORT=int(setts['Web_Dash_Port']) logger.info ("Serving Web Dashboard from port "+str(WDPORT)) - command=shlex.split("/usr/bin/node /usr/local/bin/serve -p "+ str(WDPORT)) + command=shlex.split("/usr/bin/node /usr/local/bin/http-server -p "+ str(WDPORT)) webDash=subprocess.Popen(command) @@ -678,7 +678,7 @@ def findinv(networks): os.chdir("/app/WebDashboard") WDPORT = int(setts['Web_Dash_Port']) logger.info("Serving Web Dashboard from port " + str(WDPORT)) - command = shlex.split("/usr/bin/node /usr/local/bin/serve -p " + str(WDPORT)) + command = shlex.split("/usr/bin/node /usr/local/bin/http-server -p " + str(WDPORT)) webDash = subprocess.Popen(command) if setts['MQTT_Address']=="127.0.0.1":