mirror of
https://github.com/ditatompel/insights.git
synced 2025-01-08 03:12:06 +07:00
21 lines
579 B
Docker
21 lines
579 B
Docker
###############
|
|
# Build Stage #
|
|
###############
|
|
FROM hugomods/hugo:exts as builder
|
|
# Base URL
|
|
ARG HUGO_BASEURL=
|
|
ENV HUGO_BASEURL=${HUGO_BASEURL}
|
|
# Module Proxy
|
|
ARG HUGO_MODULE_PROXY=
|
|
ENV HUGO_MODULE_PROXY=${HUGO_MODULE_PROXY}
|
|
# Build site
|
|
COPY . /src
|
|
RUN hugo --minify --gc --enableGitInfo
|
|
# 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 --from=builder /src/public /site
|