Trying to deploy a custom mfe on the server

I have built a custom mfe image on my machine using tutor images build mfe and push it to the docker repository already. I am try to run it on the server but I am having difficulty deploying that mfe. I cannot find the MFE_DOCKER_IMAGE option in this documentation. Could someone guide how to deploy a custom mfe on the server?

Thank you very much.

Hi @Xiao_Long,

You have to add MFE_DOCKER_IMAGE: <your MFE container URL> to the config.yml file. Then tutor images build mfe and tutor images push mfe so your mfe image is properly tagged and pushed to your registry. Finally restart your server to pull and deploy the updated image.

Hope it helps!

1 Like

It works. Thank you very much for the help @Andres.Aulasneo.

I also need help with adding a custom domain into CORS_ORIGIN_WHITELIST of the config.yml. I try tutor config save --append CORS_ORIGIN_WHITELIST=http://xx.xx..xx.xx:3000 but it does not add the domain to the CORS_ORIGIN_WHITELIST list.
Right now, I have to manually add the domain to the config file and when I run tutor config save and it will disappear.

No, it will not work this way. For testing, you can add CORS_ORIGIN_WHITELIST.append('http://xx.xx..xx.xx:3000') at the end of env/apps/openedx/settings/lms/ (or /cms/ if it is for Studio; if you are running tutor dev).

Note that files inside env are overwritten with tutor config save, so make the change after saving the configuration.

For a permanent change you should create a Tutor plugin implementing the openedx-lms-production-settings patch with the same line.


1 Like

I see. I truly appreciate your assistance. Thank you.

1 Like