So I was looking to the docker-compose in the devstack
And I was wondering regarding this comment
# ==========================================================================
# edX Microfrontends
#
# TODO: Instead of having an nginx container for every single microfrontend
# (there are like 12 now, right?), we should come up with an actual strategy
# for micro-frontends in devtack.
# ==========================================================================
Nginx or any other web server is required to serve MFEs. They are static HTML/JS/CSS files. Is there any other option to deliver these files to the user?
The node:12 is the official image from node, however this image is usually used for development purpose and is not recommended for production, hence it doesn’t use nginx. Which to my understnding shall make the comment I qouted above irrelevant.
Well, obviously there is no Nginx container used to host MFEs as you noted. however, I think there is a plan to aggregate (centralize) all MFEs within a single container with a web server like Nginx. I’m not aware of the details but you can read more and ask your questions in this thread.
I hope it helps
P.S: As you know devstack is not recommended for production environments.
And yes, I am aware that the devstack is for the development purpose, but I just wanted to make sense of it’s architecture and that comment really confused me!. I start looking for where is the nginx services is defined.
I guess it’s better to reword it, to reflect the true nature of the devstack. something like:
Todo: wrap all MFE in one nginx container, check (the thread you linked...etc)
Sorry for the confusion @ghassan – I was mistaken when I wrote that comment. It should say Instead of having a node container for every single microfrontend...
As you and @mahyard seem to already be aware, this comment is expressing my desire that we hosted all MFEs from a single container instead of requiring a dozen or so containers to run all of them. I wasn’t able to follow up on that, but it’s exciting to see that others have been looking into it.