- Remove node_modules from deploy zip (302MB -> ~1MB), let Oryx build on Azure - Add startup.sh: creates .env/.langgraph_api prereqs, installs pnpm, runs langgraphjs dev - Azure config: WEBSITES_CONTAINER_START_TIME_LIMIT=600, SCM_DO_BUILD_DURING_DEPLOYMENT=true, ENABLE_ORYX_BUILD=true, PRE_BUILD_COMMAND="npm install -g pnpm@10" - Delete auto-generated main_soc-langgraph.yml (conflicts with deploy-langgraph.yml) - Enable Always On to avoid cold starts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
640 B
Bash
Executable File
26 lines
640 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=== LangGraph Server Startup ==="
|
|
|
|
cd /home/site/wwwroot
|
|
|
|
# Ensure langgraphjs dev prerequisites exist
|
|
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 2024..."
|
|
exec npx langgraphjs dev --host 0.0.0.0 --port 2024 --no-browser
|