Hacker News new | ask | show | jobs
by ericls 965 days ago
Might be easier to just run nginx container and mount the frontend app as a volume.
2 comments

I have a multilayer build. On the Dev layer, we use vite and mount the react code as a volume. On the prod layer,we bundle everything using vite and serve the app using caddy. Best of both worlds. Dependencies are all containerised and handled using docker compose for local Dev. I have a local CI/CD pipeline using Task and the same pipeline using gitlab CI/CD for when we push to the repo.
this may be true, but (as far as I'm aware) within kubernetes, it's easier to update a deployment image, rather than a volume mount.