1
0

补充docker打包和服务的脚本

This commit is contained in:
2026-01-14 09:45:12 +08:00
parent 8eaffefe92
commit 311f111da8
4 changed files with 20 additions and 1 deletions

7
docker/Dockerfile.build Normal file
View File

@@ -0,0 +1,7 @@
FROM hugomods/hugo:exts
WORKDIR /site
RUN mkdir -p /build
ENTRYPOINT [ "hugo", "--minify", "--enableGitInfo", "--destination", "/build" ]

12
docker/Dockerfile.server Normal file
View File

@@ -0,0 +1,12 @@
FROM hugomods/hugo:exts AS builder
ARG HUGO_BASEURL=
ENV HUGO_BASEURL=${HUGO_BASEURL}
COPY . /src
RUN hugo --minify --enableGitInfo
FROM hugomods/hugo:nginx
COPY --from=builder /src/public /site