Skip to content

Commit

Permalink
Allow readonly config by environment variable (#423)
Browse files Browse the repository at this point in the history
* Allow readonly config by environment variable
* Update readme about readOnly variable
  • Loading branch information
rafaelquines authored and dozoisch committed Jul 2, 2018
1 parent 7c7534c commit baa1d5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -141,6 +141,7 @@ You can use the following [environment variables](https://docs.docker.com/refere
`ME_CONFIG_BASICAUTH_PASSWORD` | `pass` | mongo-express web login password.
`ME_CONFIG_REQUEST_SIZE` | `100kb` | Used to configure maximum mongo update payload size. CRUD operations above this size will fail due to restrictions in [body-parser](https://www.npmjs.com/package/body-parser).
`ME_CONFIG_OPTIONS_EDITORTHEME` | `rubyblue` | Web editor color theme, [more here](http://codemirror.net/demo/theme.html).
`ME_CONFIG_OPTIONS_READONLY` | `false` | if readOnly is true, components of writing are not visible.
`ME_CONFIG_SITE_SSL_ENABLED` | `false` | Enable SSL.
`ME_CONFIG_MONGODB_SSLVALIDATE` | `true` | Validate mongod server certificate against CA
`ME_CONFIG_SITE_SSL_CRT_PATH` | ` ` | SSL certificate file.
Expand Down
2 changes: 1 addition & 1 deletion config.default.js
Expand Up @@ -127,7 +127,7 @@ module.exports = {
subprocessTimeout: 300,

//readOnly: if readOnly is true, components of writing are not visible.
readOnly: false,
readOnly: process.env.ME_CONFIG_OPTIONS_READONLY || false,

//collapsibleJSON: if set to true, jsons will be displayed collapsible
collapsibleJSON: true,
Expand Down

0 comments on commit baa1d5c

Please sign in to comment.