Skip to content

Commit

Permalink
feat: introduce a patch for the Docker base layer
Browse files Browse the repository at this point in the history
This patch allows the customisation of the mfe base layer. Without it,
we have to apply changes to the "mfe-dockerfile-pre-npm-install" patch,
and that means re-apply changes for every single MFE.
  • Loading branch information
regisb committed Jun 27, 2024
1 parent f1007a8 commit 1a7c813
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ Add any configurations at the end of the development webpack config file in Java

File changed: ``tutormfe/templates/mfe/apps/mfe/webpack.dev-tutor.config.js``

mfe-dockerfile-base
~~~~~~~~~~~~~~~~~~~

Add Dockerfile instructions that will be applied to the base layer of the "mfe" image. This base layer is used both in production and development, for all applications.

File changed: ``tutormfe/templates/mfe/build/mfe/Dockerfile``

mfe-dockerfile-pre-npm-install
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Feature] Introduce a "mfe-dockerfile-base" patch to customise the base layer of the "mfe" Docker image. (by @regisb)
2 changes: 2 additions & 0 deletions tutormfe/templates/mfe/build/mfe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ RUN mkdir -p /openedx/app /openedx/env
WORKDIR /openedx/app
ENV PATH=/openedx/app/node_modules/.bin:${PATH}

{{ patch("mfe-dockerfile-base") }}

{% for app_name, app in iter_mfes() %}
####################### {{ app_name }} MFE
######## {{ app_name }} (git)
Expand Down

0 comments on commit 1a7c813

Please sign in to comment.