From 5681ca4acfdced55c2f8bdc074a6a231548c1218 Mon Sep 17 00:00:00 2001 From: DJP Date: Fri, 10 Apr 2026 20:18:00 -0400 Subject: [PATCH] Always rebuild frontend with --no-cache in deploy script Next.js builds inside Docker's multi-stage builder get cached even when source files change, causing stale frontends after deploy. Backend still uses normal caching since Python doesn't have this issue. Co-Authored-By: Claude Opus 4.6 --- deploy.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 92ff031..777c238 100755 --- a/deploy.sh +++ b/deploy.sh @@ -221,12 +221,15 @@ log "Pulling latest code..." git pull --ff-only || error "Git pull failed. Resolve conflicts manually." # Build images +# Frontend always gets --no-cache to avoid stale Next.js builds from Docker layer cache if [ "$REBUILD" = true ]; then log "Rebuilding all images (no cache)..." $COMPOSE build --no-cache else - log "Building updated images..." - $COMPOSE build + log "Building backend..." + $COMPOSE build backend celery_worker + log "Building frontend (no cache)..." + $COMPOSE build --no-cache frontend fi # Run migrations (safe to run even if nothing changed)