@@ -2,19 +2,13 @@ FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
22
33ARG TARGETARCH
44
5- # Admin UI static assets. Re-fetched on every build when ASSETS_CACHEBUST
6- # differs (CI passes a timestamp / commit SHA). For local iteration, the
7- # default value keeps the cached layer.
8- #
9- # Override for a one-off local refresh:
10- # docker build --build-arg ASSETS_CACHEBUST=$(date +%s) .
11- # Pin to a commit SHA rather than @main so jsdelivr's aggressive branch-tip
12- # caching can't serve a stale bundle for hours after a DS push. Bump this
13- # when you want the latest DS changes; confirm the hash exists at
14- # github.com/dzarlax/design-system before committing.
5+ # Admin UI static assets. Pin to a commit SHA rather than @main so jsdelivr's
6+ # aggressive branch-tip caching can't serve a stale bundle for hours after a DS
7+ # push. Bump DS_VERSION or HTMX_VERSION when you want to refresh these assets;
8+ # confirm the DS hash exists at github.com/dzarlax/design-system before
9+ # committing.
1510ARG DS_VERSION=f36e79e50e9341ef5780fb89ec41c1f49e447811
1611ARG HTMX_VERSION=2.0.3
17- ARG ASSETS_CACHEBUST=pinned
1812
1913RUN apk add --no-cache curl
2014
@@ -25,10 +19,7 @@ RUN go mod download
2519
2620COPY . .
2721
28- # Overwrite the committed placeholders with real assets. The ASSETS_CACHEBUST
29- # ARG is referenced so that changing it invalidates this layer.
30- RUN echo "assets cachebust: ${ASSETS_CACHEBUST}" && \
31- curl -fsSL "https://cdn.jsdelivr.net/gh/dzarlax/design-system@${DS_VERSION}/dist/dzarlax.css" \
22+ RUN curl -fsSL "https://cdn.jsdelivr.net/gh/dzarlax/design-system@${DS_VERSION}/dist/dzarlax.css" \
3223 -o internal/adminapi/static/dzarlax.css && \
3324 curl -fsSL "https://cdn.jsdelivr.net/gh/dzarlax/design-system@${DS_VERSION}/dist/dzarlax.js" \
3425 -o internal/adminapi/static/dzarlax.js && \
0 commit comments