Re:How to Dockerize a React App and Deploy It Easily
by ericls on Wednesday November 01, 2023 @11:59AM
(#38100122)
Might be easier to just run nginx container and mount the frontend app as a volume.
[ Parent
| on HN ]
Re:How to Dockerize a React App and Deploy It Easily
by bafe on Wednesday November 01, 2023 @12:13PM
(#38100387)
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.
Re:How to Dockerize a React App and Deploy It Easily
by thewisenerd on Wednesday November 01, 2023 @01:25PM
(#38101614)
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.