-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (21 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#####################################################################
# Build Stage #
#####################################################################
FROM hugomods/hugo:exts as builder
# Base URL
ARG HUGO_BASEURL
ENV HUGO_BASEURL=${HUGO_BASEURL}
ARG PLAUSIBLE_ENDPOINT
ENV HUGOxPARAMSxPLAUSIBLE_ANALYTICSxENDPOINT=${PLAUSIBLE_ENDPOINT}
# Build site
COPY . /src
RUN npm install
RUN hugo --minify --gc && mkdir -p /src/public/assets/emojis/ && cp -r ./node_modules/@twemoji/svg/*.svg /src/public/assets/emojis/
# Set the fallback 404 page if defaultContentLanguageInSubdir is enabled, please replace the `en` with your default language code.
# RUN cp ./public/en/404.html ./public/404.html
#####################################################################
# Final Stage #
#####################################################################
FROM hugomods/hugo:nginx
# Copy the generated files to keep the image as small as possible.
COPY --from=builder /src/public /site