2023-08-19 06:47:37 +00:00
|
|
|
FROM node:18.17-alpine as builder
|
2021-01-16 20:58:43 +00:00
|
|
|
|
2023-05-18 04:55:09 +00:00
|
|
|
ARG PLAUSIBLE_CUSTOM_DOMAIN=""
|
|
|
|
ARG PLAUSIBLE_SCRIPT_URI=""
|
|
|
|
|
|
|
|
ENV PLAUSIBLE_CUSTOM_DOMAIN=$PLAUSIBLE_CUSTOM_DOMAIN \
|
|
|
|
PLAUSIBLE_SCRIPT_URI=$PLAUSIBLE_SCRIPT_URI \
|
|
|
|
GATSBY_TELEMETRY_DISABLED=1
|
2021-01-16 20:58:43 +00:00
|
|
|
|
2021-04-24 16:26:01 +00:00
|
|
|
RUN apk --no-cache add shadow \
|
|
|
|
gcc \
|
|
|
|
musl-dev \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
make \
|
|
|
|
libtool \
|
|
|
|
nasm \
|
|
|
|
tiff \
|
|
|
|
jpeg \
|
|
|
|
zlib \
|
|
|
|
zlib-dev \
|
|
|
|
file \
|
2023-08-19 06:53:18 +00:00
|
|
|
pkgconf
|
2023-08-19 06:47:37 +00:00
|
|
|
|
2021-01-16 20:58:43 +00:00
|
|
|
WORKDIR /usr/src/app
|
2021-11-11 08:08:12 +00:00
|
|
|
COPY package.json yarn.lock ./
|
2023-08-19 07:03:16 +00:00
|
|
|
RUN yarn --network-timeout 300000
|
2023-08-19 06:47:37 +00:00
|
|
|
|
2021-01-16 20:58:43 +00:00
|
|
|
COPY . ./
|
2023-08-19 06:47:37 +00:00
|
|
|
ENV NODE_ENV=production
|
2021-01-16 20:58:43 +00:00
|
|
|
RUN yarn build
|
|
|
|
|
2023-08-19 06:47:37 +00:00
|
|
|
FROM nginx:1.25-alpine
|
|
|
|
|
2022-10-14 07:52:03 +00:00
|
|
|
COPY --from=builder /usr/src/app/public /var/www
|
2021-04-24 16:26:01 +00:00
|
|
|
COPY default.conf /etc/nginx/templates/default.conf.template
|
2021-01-16 20:58:43 +00:00
|
|
|
EXPOSE 80
|
2021-04-24 16:26:01 +00:00
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|