0

I am facing issue while deploying Gatsby SSR code to GCP using docker as an image container. The image size is coming more than 3.0GB which is heavy for handling load and autoscaling in GCP resultuing into 503 errors while accessing the website.

Another issue is, index.html is not getting generated after running Gatsby build in my Gatsby SSR application due to which I am not able to use nginx

Please help me reduce the image size at most priority.

Right now using single stage build in Docker Where building the application first using Gatsby build and then serving it on a port using Gatsby serve command.

Because node modules are also part of the image so size is very high.

Tried nginx multi-stage build as well but that didn't work because it is not able to find the index.html in the root of the build folder.

Need to minimise the container image size

0 Answers0