fix: add cache-bust build arg to force Docker rebuild on deploy
Portainer stack updates were serving stale cached Docker layers. Added CACHE_BUST ARG so each deploy can force a fresh build. Set CACHE_BUST env var in Portainer to current timestamp to trigger. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8e9285cd50
commit
834be596ba
@@ -7,13 +7,18 @@ COPY frontend/package.json frontend/
|
||||
COPY server/package.json server/
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Cache-bust arg — pass --build-arg CACHE_BUST=$(date +%s) to force rebuild
|
||||
ARG CACHE_BUST=0
|
||||
|
||||
# Stage 2: Build frontend
|
||||
FROM deps AS build-fe
|
||||
ARG CACHE_BUST
|
||||
COPY frontend/ frontend/
|
||||
RUN pnpm --filter frontend build
|
||||
|
||||
# Stage 3: Build server
|
||||
FROM deps AS build-be
|
||||
ARG CACHE_BUST
|
||||
COPY server/ server/
|
||||
RUN pnpm --filter server build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user