template-fastapi-react
template-fastapi-react copied to clipboard
[Suggestion] Let NginX serve the static files generated by Node.js
Describe Problem
Currently, (the web server) NginX does not host any of the static files generated by Node.js.
Suggest Changes
My suggestion, is to let NginX host all static files, and remove the web container for the production environment
Provide Examples
I've done something similar in a different project. I can provide a PR if that is desired.
@sindre-nistad Related to #51?
@sindre-nistad Related to #51?
I don't think so? #51 seem related to the publishing of the NginX image, while this is suggesting removing the need for the web container in prod.
It will still be necessary when developing locally (hor reloading and such), but it should reduce the number of dependencies (e.g. serve), and potentially make the loading of the site a little quicker (fewer hops on the server / hosting environment).