Skip to content

Commit

Permalink
change docker deployment instructions to not use volume mounts
Browse files Browse the repository at this point in the history
as previous way to build was causing the node_modules directory to be replaced when mounting the volume.
  • Loading branch information
augusto-herrmann committed Sep 20, 2021
1 parent dcb2bbe commit 63bf7ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# If you want to just build the documentation portal locally, do:
# docker build --rm -t publicbodies .
# to build the container, then run
# docker run --rm --volume="$PWD:/home/node/portal" -p 3000:3000 -it publicbodies node index.js
# docker run --rm --name publicbodies -p 3000:3000 -it publicbodies node index.js
# open http://localhost:3000 on your browser to see the portal.

FROM node:12
Expand All @@ -26,5 +26,13 @@ COPY ./package.json /home/node/portal/package.json
WORKDIR /home/node/portal
RUN npm install .

# copy website resources
COPY ./lib /home/node/portal/lib
COPY ./routes /home/node/portal/routes
COPY ./views /home/node/portal/views
COPY ./public /home/node/portal/public
COPY ./data /home/node/portal/data
COPY ./index.js /home/node/portal/

# port Docusaurus runs on
EXPOSE 3000
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The website is a node webapp. To get it running:
If you're using Docker, start the container instead:

```
docker run --rm --volume="$PWD:/home/node/portal" -p 3000:3000 -it publicbodies node index.js
docker run --rm --name publicbodies -p 3000:3000 -it publicbodies node index.js
```

The list of outstanding issues is at: <https://github.com/okfn/publicbodies/issues>
Expand Down

0 comments on commit 63bf7ac

Please sign in to comment.