Gatsby + Fly stack?

Here’s a quick example.

Dockerfile:

    FROM node:13-buster-slim as build
    WORKDIR /app
    RUN yarn global add gatsby-cli && gatsby telemetry --disable
    ADD package.json yarn.lock ./
    RUN yarn --production --frozen-lockfile --non-interactive
    ADD . ./
    RUN gatsby build
    FROM pierrezemb/gostatic
    COPY --from=build /app/public /srv/http
    EXPOSE 8043

.dockerignore

    .cache/
    node_modules/
    public/

in the gatsby site directory for both, then

flyctl init -p 8043
flyctl deploy

and get a nice cup’o’joe…

2 Likes