3 ms·
> I have to spin up a whole container just to run `npm start` locally? I'm pretty sure that the intent there is to make your bundled JS/HTML/CSS be ready for d
by KronisLV 3y ago
> I have to spin up a whole container just to run `npm start` locally?
I'm pretty sure that the intent there is to make your bundled JS/HTML/CSS be ready for deployment, not that you have to use the approach locally (outside of maybe checking whether the containers are built correctly and all of the assets are served).
If you have a container cluster that has your back end APIs and your DBs running in it, you can deploy your front end alongside those, with the web server running inside of the container that will serve the files.
Not the only way to do it, of course, but if you are already using containers (and perhaps appreciate the 12 Factor App principles), then this approach is rather pleasant. I can see myself linking a tutorial like that to someone, should I want to introduce them to the approach.
- vlunkr 3y agoYeah, this is a multi-stage build where the final image will have only the statically built content in it.