This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
tribalwarshelp.com/Dockerfile

36 lines
661 B
Docker
Raw Normal View History

FROM node:14.19.1-alpine as build-deps
2020-07-26 10:19:24 +00:00
ARG PLAUSIBLE_CUSTOM_DOMAIN=""
ENV PLAUSIBLE_CUSTOM_DOMAIN=$PLAUSIBLE_CUSTOM_DOMAIN \
NODE_ENV=production
2020-07-26 10:19:24 +00:00
2021-04-24 07:02:49 +00:00
RUN apk --no-cache add shadow \
gcc \
musl-dev \
autoconf \
automake \
make \
libtool \
nasm \
tiff \
jpeg \
zlib \
zlib-dev \
file \
pkgconf
2020-07-26 10:19:24 +00:00
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn global add gatsby-cli@3.3.0
2020-07-26 10:19:24 +00:00
RUN yarn
COPY . ./
RUN yarn build
#Stage 2
FROM nginx:1.21-alpine
2021-04-24 14:46:18 +00:00
COPY --from=build-deps /usr/src/app/public /var/www
COPY default.conf /etc/nginx/templates/default.conf.template
2020-07-26 10:19:24 +00:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]