mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-29 19:59:14 -04:00
Settings: Support null and undefined env var substitutions
This commit is contained in:
parent
299dbbe7e6
commit
c7bb18c6da
4 changed files with 65 additions and 10 deletions
|
@ -24,6 +24,29 @@
|
|||
*
|
||||
* This is useful, for example, when running in a Docker container.
|
||||
*
|
||||
* DETAILED RULES:
|
||||
* - If the environment variable is set to the string "true" or "false", the
|
||||
* value becomes Boolean true or false.
|
||||
* - If the environment variable is set to the string "null", the value
|
||||
* becomes null.
|
||||
* - If the environment variable is set to the string "undefined", the setting
|
||||
* is removed entirely, except when used as the member of an array in which
|
||||
* case it becomes null.
|
||||
* - If the environment variable is set to a string representation of a finite
|
||||
* number, the string is converted to that number.
|
||||
* - If the environment variable is set to any other string, including the
|
||||
* empty string, the value is that string.
|
||||
* - If the environment variable is unset and a default value is provided, the
|
||||
* value is as if the environment variable was set to the provided default:
|
||||
* - "${UNSET_VAR:}" becomes the empty string.
|
||||
* - "${UNSET_VAR:foo}" becomes the string "foo".
|
||||
* - "${UNSET_VAR:true}" and "${UNSET_VAR:false}" become true and false.
|
||||
* - "${UNSET_VAR:null}" becomes null.
|
||||
* - "${UNSET_VAR:undefined}" causes the setting to be removed (or be set
|
||||
* to null, if used as a member of an array).
|
||||
* - If the environment variable is unset and no default value is provided,
|
||||
* the value becomes null.
|
||||
*
|
||||
* EXAMPLE:
|
||||
* "port": "${PORT:9001}"
|
||||
* "minify": "${MINIFY}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue