Skip to content

Commit 95481a8

Browse files
committed
Merge pull request #63 from timchunght/docker
Docker
2 parents 69ef24b + 4024873 commit 95481a8

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node:4.3.2
2+
ADD package.json /src/package.json
3+
RUN cd /src && npm install
4+
ADD . /src
5+
WORKDIR /src
6+
ENTRYPOINT ["npm", "start", "--"]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,30 @@ If you want to require a username and password to access the dashboard, you can
7878

7979
HTTPS and Basic Auth are mandatory if you are accessing the dashboard remotely instead of accessing it from `localhost`.
8080

81+
## Run with Docker
82+
83+
It is easy to use it with Docker. First build the image:
84+
85+
```
86+
docker build -t parse-dashboard .
87+
```
88+
89+
Run the image with your ``config.json`` mounted as a volume
90+
91+
```
92+
docker run -d -p 8080:4040 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard
93+
```
94+
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).
96+
97+
In this example, we want to run the application in production mode at port 80 of the host machine.
98+
99+
```
100+
docker run -d -p 80:8080 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard --port 8080
101+
```
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.
104+
81105
## Deploying in production
82106

83107
If you're deploying to a provider like Heroku, or Google App Engine, the SSL endpoint is terminated early and handled by the provider and you may encounter this error `Parse Dashboard can only be remotely accessed via HTTPS`.

0 commit comments

Comments
 (0)