perf(deploy): pre-install node_modules in CI and enable always-on to fix slow cold start

- CI now runs pnpm install and includes node_modules in the zip artifact
- startup.sh simplified: removed pnpm install fallback, uses direct bin path instead of npx
- Azure Web App always-on enabled to prevent cold starts

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-10 15:55:38 +08:00
co-authored by Claude Sonnet 4.6
parent 370726c811
commit 3263b15554
2 changed files with 12 additions and 16 deletions
+1 -13
View File
@@ -9,17 +9,5 @@ cd /home/site/wwwroot
touch .env
mkdir -p .langgraph_api
# Install pnpm globally if not available
if ! command -v pnpm &> /dev/null; then
echo "Installing pnpm..."
npm install -g pnpm@10
fi
# Install dependencies if node_modules is missing (Oryx should have done this, but fallback)
if [ ! -d "node_modules" ]; then
echo "node_modules not found, installing dependencies..."
pnpm install --frozen-lockfile
fi
echo "Starting LangGraph server on port ${PORT:-8080}..."
exec npx langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser
exec ./node_modules/.bin/langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser