feat: add langgraph/ — LangGraph.js gen-ui server with CI/CD to Azure Container App

## Azure Resources Created
- ACR: socsocacr.azurecr.io (Operation, southeastasia)
- Container App Environment: soc-cae (Operation, southeastasia)
- Container App: soc-langgraph (Operation, southeastasia, port 2024)
  - Scale: 0-2 replicas, 0.5 vCPU / 1GB
  - Registry: socsocacr.azurecr.io (system-assigned managed identity)
- OIDC: oidc-msi-8ac6 granted Contributor on Operation resource group

## What's included
- Full langgraphjs-gen-ui-examples codebase under langgraph/
- Dockerfile: node:20-slim + pnpm, exposes port 2024
- .dockerignore, .gitignore
- GitHub Actions: .github/workflows/deploy-langgraph.yml
  - Trigger: push to main, paths langgraph/**
  - Uses az acr build (cloud build, no local Docker needed)
  - Deploys to soc-langgraph Container App

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-10 04:01:06 +08:00
co-authored by Claude Sonnet 4.6
parent c6ca9dc126
commit ac388b3c07
80 changed files with 5002 additions and 0 deletions
@@ -0,0 +1,12 @@
import { BaseMessage } from "@langchain/core/messages";
export function formatMessages(messages: BaseMessage[]): string {
return messages
.map((m, i) => {
const role = m.getType();
const contentString =
typeof m.content === "string" ? m.content : JSON.stringify(m.content);
return `<${role} index="${i}">\n${contentString}\n</${role}>`;
})
.join("\n");
}