feat: build an image that uses runtime configuration #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update: work is continued over here: overhangio#69
Description
MFE_ENABLE_CONFIG_API
as a boolean plugin setting.MFE_ENV_COMMON
as a plugin setting.env/production
andenv/development
.MFE_<APPNAME>_MFE_APP["env"]
.MFE_ENABLE_CONFIG_API==True
, use the new run-time config system:env/production
andenv/development
, only renderMFE_CONFIG_API_URL
.MFE_CONFIG_API_URL=https://<mfe_hostname>/api/mfe_config/v1
. Then, configure Caddy to forward this request to LMS. We must do this because the MFE does not know the LMS's base URL before it gets a response from the MFE Config API (thanks @ghassanmas for the idea).MFE_CONFIG_API_URL=http://local.overhang.io:8000/api/mfe_config/v1
. This is based on the assumption that LMS is always at local.overhang.io:8000 when using dev mode.APP_ID
in:env/production.override
, for productiondev/docker-compose.yml
as an environment variable, for developmentcommon.py
settings file, render the contents ofMFE_ENV_COMMON
andMFE_<APPNAME>_MFE["env"]
for the MFE Config API to serve.MFE_ENABLE_CONFIG_API==False
, use build-time config, just as tutor-mfe did before:MFE_ENV_COMMON
directly intoenv/production
andenv/development
MFE_<APPNAME>_MFE["env"]
into:env/production.override
for productiondev/docker-compose.yml
as environment variables, for developmentTo do
MFE_ENV_COMMON
andMFE_ENABLE_CONFIG_API
settings in the README.Links
Closes https://github.com/overhangio/2u-tutor-adoption/issues/87
Blocked by completion of: MFE runtime configuration openedx/wg-frontend#103, which requires merging: