template-fastapi-react icon indicating copy to clipboard operation
template-fastapi-react copied to clipboard

[Suggestion] Let NginX serve the static files generated by Node.js

Open sindre-nistad opened this issue 2 years ago • 2 comments

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 avatar Mar 14 '23 08:03 sindre-nistad

@sindre-nistad Related to #51?

olavis avatar Mar 15 '23 07:03 olavis

@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).

sindre-nistad avatar Mar 15 '23 09:03 sindre-nistad