From 9c416777d60e9d1f8cb3a18174017204150f8bb8 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 28 Apr 2026 09:36:35 +0200 Subject: [PATCH] build: auto-bust docker cache when layout.templ changes --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index ad8f3e7..ed89c54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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