Skip to content

Commit

Permalink
Replace npm module "serve" with "http-server"
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGallo committed Oct 1, 2024
1 parent 5f48d03 commit 8827830
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 8827830

Please sign in to comment.