Skip to content

Resolve "rework config"

Mael Gaonach requested to merge 670-rework-config into main

Closes #670 (closed), #309 (closed), #307 (closed) (+ potentially #655 (closed))

Config is now done through json files (replacable at runtime) instead of env var (that were read at build time and then hardcoded in the bundle). The config doc was updated to explain how to set up the new configuration.

Key point is that this allows to have a single docker image that can be used with any config by replacing the config directory with a volume when starting it:

docker run -v /path/to/your/config:/usr/share/nginx/html/config -p 80:80 portal

This allows different sites to use the same image by just switching it to their config. It could also allow us to solve #655 (closed) by mounting the config directory to something we can edit without re-deploying. TBD: can we mount volumes with the current docker deploying system?

Foreseen extension after this is merged:

I think we can move the config for dataset/sample/investigation viewer switching to json files in a similar manner and replace the components in there directly by the microfrontend's url to import them dynamically like they do here. This would allow for completely transparent change of vizualisation and microfrontends config: nothing to change in the project's code, no imports to add, just a new entry in the config with the new URL and info on what to use it for.

Edited by Mael Gaonach

Merge request reports

Loading