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)