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

feat: add patch at the end of the production layer #179

Closed MoisesGSalas closed 10 months ago

MoisesGSalas commented 11 months ago

Description

The mfe-dockerfile-production-final patch allows you to add instructions to the end of the final layer. This is useful in the case you want to override the default CMD or ENTRYPOINT instructions.

Additional info

I think the patch will be useful overall, but my use case is as follows:

I've been exploring the idea of pointing Public Path to a cloudfront endpoint to speed up the MFE asset delivery. The only problem is that I can't reuse the image between environments because the cloudfront endpoint is hardcoded at build time. What I've been playing around is to use a placeholder string as the PUBLIC_PATH and run a startup script in the container that replaces the placeholder with a value set in an environment variable.

regisb commented 10 months ago

Thanks for this PR @MoisesGSalas!