build(docs): provide git context for hugo enableGitInfo
This commit is contained in:
2 files changed
+8
-3
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Exclude development and build artifacts
|
||||
|
||||
# Version control
|
||||
.git/
|
||||
!.git/
|
||||
.gitignore
|
||||
|
||||
# Dependencies
|
||||
|
||||
@@ -2,14 +2,19 @@
|
||||
FROM ghcr.io/gohugoio/hugo:v0.154.5 AS builder
|
||||
|
||||
WORKDIR /src
|
||||
COPY services/docs /src
|
||||
# Copy git directory for git info metadata
|
||||
COPY --chown=hugo:hugo .git /src/.git
|
||||
COPY --chown=hugo:hugo services/docs /src/services/docs
|
||||
|
||||
USER hugo
|
||||
|
||||
WORKDIR /src/services/docs
|
||||
RUN hugo --gc --minify
|
||||
|
||||
# Stage 2: Runtime
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /src/public /usr/share/nginx/html
|
||||
COPY --from=builder /src/services/docs/public /usr/share/nginx/html
|
||||
COPY ci/config/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in new issue
Block a user