diff --git a/deploy/social/deploy_82.py b/deploy/social/deploy_82.py index d0df082..a0d1567 100644 --- a/deploy/social/deploy_82.py +++ b/deploy/social/deploy_82.py @@ -188,11 +188,16 @@ trap cleanup EXIT sudo systemctl stop nomadro.service || true sudo chown -R ubuntu:ubuntu "$APP" # keep previous .next as fallback until new build succeeds -if [ -d "$APP/.next" ]; then +if [ -d "$APP/.next" ] && [ -f "$APP/.next/BUILD_ID" ]; then rm -rf /tmp/nomadro.next.bak mv "$APP/.next" /tmp/nomadro.next.bak +else + rm -rf "$APP/.next" fi +# sync deps (e.g. centrifuge) without ballooning memory +/usr/local/bin/pnpm install --prefer-offline + export NODE_OPTIONS="--max-old-space-size=$HEAP" export NEXT_TELEMETRY_DISABLED=1 export UV_THREADPOOL_SIZE=2