build: auto-bust docker cache when layout.templ changes

This commit is contained in:
2026-04-28 09:36:35 +02:00
parent 80d9a72600
commit 9c416777d6

View File

@@ -22,6 +22,11 @@ RUN go mod download
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
# Copy key source files first to auto-bust cache when they change
# This ensures the COPY . . layer is never stale
COPY web/shared/layout/layout.templ ./
RUN cat web/shared/layout/layout.templ | md5sum > /tmp/source_hash.txt
COPY . .
# Generate templ files