### Summary of Changes - **Version Metadata Generation**: - `ci/docker/www/Dockerfile` & `ci/docker/docs/Dockerfile` accept `COMMIT_SHA` and `VERSION` build args and write `/usr/share/nginx/html/version.json`. - `ci/config/nginx/default.conf` configures `location = /version.json` with `Cache-Control: no-store, no-cache, must-revalidate` so verification is never stale. - **Automated Rollout Verification**: - `.github/workflows/services-www-releases-dispatch-release.yml` - `.github/workflows/services-docs-next-required.yml` - `.github/workflows/services-www-next-required.yml` - Added `verify-rollout` job that polls `https://www.ermnvldmr.com/version.json` and `https://docs.ermnvldmr.com/version.json` with 10s intervals (up to 5 minutes) to ensure the commit actively rolls out to users.
29 lines
813 B
Docker
29 lines
813 B
Docker
# Stage 1: Build
|
|
FROM ghcr.io/gohugoio/hugo:v0.154.5 AS builder
|
|
|
|
WORKDIR /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
|
|
|
|
ARG COMMIT_SHA="unknown"
|
|
ARG VERSION="latest"
|
|
|
|
COPY --from=builder /src/services/docs/public /usr/share/nginx/html
|
|
COPY ci/config/nginx/default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Generate version metadata for automated rollout verification
|
|
RUN printf '{\n "service": "docs",\n "version": "%s",\n "commit": "%s",\n "builtAt": "%s"\n}\n' \
|
|
"${VERSION}" "${COMMIT_SHA}" "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > /usr/share/nginx/html/version.json
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|