From e6e96877e06c03f707aaca4dcb814cb79cd9327d Mon Sep 17 00:00:00 2001 From: "Adolfo R. Brandes" Date: Fri, 1 Mar 2024 11:41:31 -0300 Subject: [PATCH] docs: How to reduce resource usage during MFE image rebuild --- README.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 791b6fce..5ac263c4 100644 --- a/README.rst +++ b/README.rst @@ -335,6 +335,10 @@ You can also bind-mount your own fork of an MFE. For example:: tutor mounts add /path/to/frontend-app-profile tutor dev launch +.. note:: + + The name of the bind-mount folder needs to match the name of the repository word-for-word. If you've forked an MFE repository with a custom name, be sure to change the name back to ensure the bind-mount works properly. + With this change, the "profile-dev" image will be automatically re-built during ``launch``. Your host repository will then be bind-mounted at runtime in the "profile" container. This means that changes you make to the host repository will be automatically picked up and hot-reloaded by your development server. This works for custom MFEs, as well. For example, if you added your own MFE named frontend-app-myapp, then you can bind-mount it like so:: @@ -343,7 +347,15 @@ This works for custom MFEs, as well. For example, if you added your own MFE name Similarly, in production, the "mfe" Docker image will be rebuilt automatically during ``tutor local launch``. -Note: the name of the bind-mount folder needs to match the name of the repository word-for-word. If you've forked an MFE repository with a custom name, be sure to change the name back to ensure the bind-mount works properly. +.. note:: + + Docker tries to run as many build processes in parallel as possible, but this can cause failures in the MFE image build. If you're running into OOM issues, RAM starvation, or network failures during NPM installs, try the following before restarting:: + + cat >buildkitd.toml <