Skip to main content

Tag: Gatsby

Gatsby Path Prefix and Docker Build

Recently I needed to containerize a Gatsby site and deploy it to a kubernetes cluster. The cluster had an ingress controller that mapped the /docs path to the Gatsby service. I just wanted to take a quick minute and document the process here. I utilized the pathPrefix in Gatsby so that the service would host the website at the /docs path. const config = { gatsby: { pathPrefix: '/docs', ... I then created the following Dockerfile to build the image that would be deployed to kubernetes.