configuration: support environment variables
See original GitHub issueA common use case when running an application inside Docker is passing configuration parameters via Environment variables.
We could introduce support for reading the values of configuration parameters from environment variables in settings.json
, taking inspiration from ElasticSearch’s environment variable substitution:
Environment variables referenced with the ${…} notation within the configuration file will be replaced with the value of the environment variable, for instance:
node.name: ${HOSTNAME} network.host: ${ES_NETWORK_HOST}
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Use environment variables in the configuration - Elastic
You can use environment variable references in the config file to set values that need to be configurable during deployment. To do this,...
Read more >Create and Modify Environment Variables on Windows
On the Advanced tab, click Environment Variables. Click New to create a new environment variable. Click Edit to modify an existing environment variable....
Read more >Environment variables to configure the AWS CLI
The AWS CLI supports the following environment variables. Specifies an AWS access key associated with an IAM user or role. If defined, this...
Read more >Configuring Environment Variables and Secrets - Render
Click on Environment in the left pane, and then click on Add Environment Variable. Service environment. Enter the Key and Value for your...
Read more >Environment Variables: What They Are and How To Use Them
Environment variables are used to store app secrets and configuration data, which are retrieved by your running app when needed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Implemented. The PR is #3572.
Please note that there is going to be a little Etherpad-specific remark, due to being tied to use a JSON file for configuration. Even when replacing a variable whose value would be a boolean or a number, quotes must be used. Etherpad, then, takes care of converting back the configuration parameter from string to the right type.
The documentation is in https://github.com/ether/etherpad-lite/blob/3b6b12e8482bb641252c2aa8fff225d61cd5225b/settings.json.template.
Hi, @gobengo, I am glad this enabled a new deployment possibility.
A rough breakdown of the remaining issues for the 1.8 milestone is as follows:
clean-css
library requires a major version bump, and this requires some work (see ~https://github.com/ether/etherpad-lite/pull/3597#issuecomment-483851384~ #3616)If you have the possibility of working on 1.a, 1.b or 2, this could help a lot. Thanks!