39 lines
743 B
Docker
39 lines
743 B
Docker
FROM node:18.17-alpine as builder
|
|
|
|
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
|
|
|
|
RUN apk --no-cache add shadow \
|
|
gcc \
|
|
musl-dev \
|
|
autoconf \
|
|
automake \
|
|
make \
|
|
libtool \
|
|
nasm \
|
|
tiff \
|
|
jpeg \
|
|
zlib \
|
|
zlib-dev \
|
|
file \
|
|
pkgconf
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY package.json yarn.lock ./
|
|
RUN yarn --network-timeout 300000
|
|
|
|
COPY . ./
|
|
ENV NODE_ENV=production
|
|
RUN yarn build
|
|
|
|
FROM nginx:1.25-alpine
|
|
|
|
COPY --from=builder /usr/src/app/public /var/www
|
|
COPY default.conf /etc/nginx/templates/default.conf.template
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|