Open
Description
Rationale
The enterprise admin wants to use their own auth, pm, compile, and other services. Also, it much desired to avoid rebuilding clients to update hostnames of such services. So admin should have a possibility to overwrite ENV variables like XOD_HOSTNAME via the config file.
Prerequisites
#2013 — introducing a new configuration file
User story
To overwrite a XOD_HOSTNAME
variable the admin sets hostname
property in the config:
{
"hostname": "my.own.server"
}
Acceptance criteria
- the env variables should have default as it works now, but it might be overwritten by values from the config
- in the code getting some constant env variable values should be replaced with functions, which gets the value from the config file, if not specified, takes it from ENV variables set during the build process, or fallback to the default values
How to implement
- Introduce a new property in the
config.json
- Create function
getXodHostname :: void -> String
with the behavior described above - Replace
process.env.XOD_HOSTNAME
and in the code with the new function
How to test
Mock the config.json
file (like in #2013) and make assertions for the new function.