Skip to content

Commit

Permalink
Install the http-server module globally
Browse files Browse the repository at this point in the history
So it can be run from the Dockerfile

Not quite sure when this behavior changed in node, since the original `http-server` docker repo
https://github.com/danjellesma/http-server/blob/master/Dockerfile#L7
has `npm i` without the global flag and it works.

+ change port and docker-compose to allow it to run along with other containers

Testing done:
- Relying on similar change for the study join page
  • Loading branch information
shankari committed Sep 13, 2022
1 parent 29c1357 commit adc63eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- db
ports:
# DASH in numbers
- "3274:8080"
- "3274:5050"
volumes:
- ./plots:/public/plots
networks:
Expand Down
6 changes: 3 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ VOLUME /plots
RUN mkdir -p /public
WORKDIR /public

RUN npm install -g [email protected] && npm i http-server
RUN npm install -g [email protected] && npm i -g http-server

COPY client /public/client
COPY *.html /public/

EXPOSE 8080
CMD ["http-server"]
EXPOSE 5050
CMD ["http-server", "-p", "5050"]

0 comments on commit adc63eb

Please sign in to comment.