Closed jeroenrinzema closed 6 years ago
I like the idea. Could these values come from Environment Variables as well? Potentially this UI will be deployed as docker container, and ENV
variables would be the easiest way to pass this values.
We could create a shell script that is executed upon startup that generates the JSON config file. I was also thinking to include the plausibility to fetch the UI config from a API.
{
"useExternalConfig": true,
"externalConfigEndpoint": "http://127.0.0.1:9090/config"
Are we sure we want to give that responsibility to the app?
We have 2 options: keep it as it is (forget my alternative) and pass the JSON as part of the building process (this is how a ConfigMap
will work in Kubernetes, one of my use-cases).
The other option is to inject Variables.
I think we can keep it as you proposed at the beginning.
Let's keep it as simple as possible and check how it is adopted.
A configuration (json) should be created that contains the instance configuration. This configuration file could be hosted as a static file (/static/config.json) and requested before Vue is initialised.
Example config file