Skip to content

Commit 4024873

Browse files
committed
Updated Dockerfile to use ENTRYPOINT with production ready command and updated README
1 parent ea96b0c commit 4024873

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ADD package.json /src/package.json
33
RUN cd /src && npm install
44
ADD . /src
55
WORKDIR /src
6-
CMD ["npm", "run", "dashboard"]
6+
ENTRYPOINT ["npm", "start", "--"]

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,15 @@ Run the image with your ``config.json`` mounted as a volume
9292
docker run -d -p 8080:4040 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard
9393
```
9494

95-
The container will boot up using the default command ``npm run dashboard``
95+
By default, the container will start the app at port 4040 inside the container. However, you can run custom command as well (see ``Deploying in production`` for custom setup).
9696

97-
However, you can run custom command as well (see ``Deploying in production`` for custom setup).
98-
99-
In this example, we want to run the custom command without HTTPS, which is necessary if you are developing using docker on Mac since docker does not run on localhost.
97+
In this example, we want to run the application in production mode at port 80 of the host machine.
10098

10199
```
102-
docker run -d -p 8080:4040 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard npm start -- --allowInsecureHTTP=1
100+
docker run -d -p 80:8080 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard --port 8080
103101
```
104-
If you are not familiar with Docker, ``npm start -- --allowInsecureHTTP=1`` is the custom command.
102+
103+
If you are not familiar with Docker, ``--port 8080`` with be passed in as argument to the entrypoint to form the full command ``npm start -- --port 8080``. The application will start at port 8080 inside the container and port ``8080`` will be mounted to port ``80`` on your host machine.
105104

106105
## Deploying in production
107106

0 commit comments

Comments
 (0)