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:
Dorian
2026-03-09 08:38:02 +00:00
co-authored by Claude Opus 4.6
parent 8e9285cd50
commit 834be596ba
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -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
+4 -1
View File
@@ -1,6 +1,9 @@
services:
botfights:
build: .
build:
context: .
args:
CACHE_BUST: ${CACHE_BUST:-0}
container_name: botfights
restart: unless-stopped
ports: