overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

fix: high memory/cpu usage in dev #137

Closed regisb closed 1 year ago

regisb commented 1 year ago

In development, the tutor-mfe plugin runs a separate container for every MFE. This runs npm run start for each of the 9 MFEs, which causes the developer laptops to crash and ice caps to melt.

Here, we adopt a different solution. By default, all MFEs run in a single container, which is the same as the production container (with caddy). Only the Caddyfile is different. This effectively resolves the performance issue.

But to allow developers to hack on invidual MFEs, we also need to run some of them in development mode, with npm run start. To do that, we run separately only those MFEs for which the developer has a bind-mounted directory that corresponds to the MFE repository. This allows developers to keep working on MFEs with the help of tutor mounts ... command.

johnvente commented 1 year ago

Hi @regisb I tried to mount a mfe for example communications but didn't work for development it may be an error mine, I run this:

regisb commented 1 year ago

@johnvente please don't use Github issues for feature requests or for support. Instead, you should create a new topic in the official Open edX forum: https://discuss.openedx.org/

johnvente commented 1 year ago

@johnvente please don't use Github issues for feature requests or for support. Instead, you should create a new topic in the official Open edX forum: https://discuss.openedx.org/

Thanks for your quick reply I've created this topic: https://discuss.openedx.org/t/running-a-mfe-with-tutor-v16-1-1/11126