You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds dev mode
when running with docker, as the local IP address is different from the dashboard
all the security features would light up.
This --dev flag let anyone run the dashboard locally easily
* Update index.js
Copy file name to clipboardExpand all lines: Parse-Dashboard/index.js
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ const program = require('commander');
16
16
program.option('--appId [appId]','the app Id of the app you would like to manage.');
17
17
program.option('--masterKey [masterKey]','the master key of the app you would like to manage.');
18
18
program.option('--serverURL [serverURL]','the server url of the app you would like to manage.');
19
+
program.option('--dev','Enable development mode. This will disable authentication and allow non HTTPS connections. DO NOT ENABLE IN PRODUCTION SERVERS');
19
20
program.option('--appName [appName]','the name of the app you would like to manage. Optional.');
20
21
program.option('--config [config]','the path to the configuration file');
21
22
program.option('--host [host]','the host to run parse-dashboard');
You may set the host, port and mount path by supplying the `--host`, `--port` and `--mountPath` options to parse-dashboard. You can use anything you want as the app name, or leave it out in which case the app ID will be used.
54
54
55
+
NB: the `--dev` parameter is disabling production-ready security features, do not use this parameter when starting the dashboard in production. This parameter is useful is you are running on docker.
56
+
55
57
After starting the dashboard, you can visit http://localhost:4040 in your browser:
56
58
57
59

@@ -451,24 +453,26 @@ You can provide a list of locales or languages you want to support for your dash
451
453
452
454
## Run with Docker
453
455
454
-
It is easy to use it with Docker. First build the image:
456
+
The official docker image is published on [docker hub](https://hub.docker.com/r/parseplatform/parse-dashboard)
457
+
458
+
Run the image with your ``config.json`` mounted as a volume
455
459
456
460
```
457
-
docker build -t parse-dashboard .
461
+
docker run -d -p 8080:4040 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parseplatform/parse-dashboard --dev
458
462
```
459
463
460
-
Run the image with your ``config.json`` mounted as a volume
464
+
You can also pass the appId, masterKey and serverURL as arguments:
461
465
462
466
```
463
-
docker run -d -p 8080:4040 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard
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).
467
471
468
472
In this example, we want to run the application in production mode at port 80 of the host machine.
469
473
470
474
```
471
-
docker run -d -p 80:8080 -v host/path/to/config.json:/src/Parse-Dashboard/parse-dashboard-config.json parse-dashboard --port 8080
If you are not familiar with Docker, ``--port 8080`` will 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.
0 commit comments