Skip to content

Commit c6742c2

Browse files
Zertzdrew-gross
authored andcommitted
Add configuration through environment variables (#456)
1 parent 2325d9e commit c6742c2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ After starting the dashboard, you can visit http://localhost:4040 in your browse
4444
![Parse Dashboard](.github/dash-shot.png)
4545

4646
## Configuring Parse Dashboard
47+
48+
### File
49+
4750
You can also start the dashboard from the command line with a config file. To do this, create a new file called `parse-dashboard-config.json` inside your local Parse Dashboard directory hierarchy. The file should match the following format:
4851

4952
```json
@@ -61,6 +64,34 @@ You can also start the dashboard from the command line with a config file. To d
6164

6265
You can then start the dashboard using `parse-dashboard --config parse-dashboard-config.json`.
6366

67+
### Environment variables
68+
69+
There are also two methods you can use to configure the dashboard using environment variables.
70+
71+
#### Multiple apps
72+
73+
Provide the entire JSON configuration in `PARSE_DASHBOARD_CONFIG` and it will be parsed just like the config file.
74+
75+
#### Single app
76+
77+
You can also define each configuration option individually.
78+
79+
```
80+
HOST: "0.0.0.0"
81+
PORT: "4040"
82+
MOUNT_PATH: "/"
83+
PARSE_DASHBOARD_ALLOW_INSECURE_HTTP: undefined // Or "1" to allow http
84+
PARSE_DASHBOARD_SERVER_URL: "http://localhost:1337/parse"
85+
PARSE_DASHBOARD_MASTER_KEY: "myMasterKey"
86+
PARSE_DASHBOARD_APP_ID: "myAppId"
87+
PARSE_DASHBOARD_APP_NAME: "MyApp"
88+
PARSE_DASHBOARD_USER_ID: "user1"
89+
PARSE_DASHBOARD_USER_PASSWORD: "pass"
90+
PARSE_DASHBOARD_SSL_KEY: "sslKey"
91+
PARSE_DASHBOARD_SSL_CERT: "sslCert"
92+
PARSE_DASHBOARD_CONFIG: undefined // Only for reference, it must not exist
93+
```
94+
6495
## Managing Multiple Apps
6596

6697
Managing multiple apps from the same dashboard is also possible. Simply add additional entries into the `parse-dashboard-config.json` file's `"apps"` array.

0 commit comments

Comments
 (0)