Answer the question
In order to leave comments, you need to log in
How to run Docker Compose with Gatsby on Node?
There is a Dockerfile:
FROM node:lts-alpine
WORKDIR /home/node/app
RUN npm i -g gatsby-cli
USER node
version: "3"
services:
node:
build:
context: ./
dockerfile: ./docker/node/Dockerfile
volumes:
- ./app:/home/node/app
command: npm run prod
ports:
- 81:3000
FROM node:lts-alpine
WORKDIR /home/node/app
# Gutsby CLI
RUN npm i -g gatsby-cli
# Install packages
USER node
COPY ./app/package.json /home/node/app
COPY ./app/package-lock.json /home/node/app
RUN npm install
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question