feat: Phase 1 — ReAct loop + Markdown rendering + Docker deployment
Deploy LangGraph Server to Azure Web App / build-and-deploy (push) Failing after 26s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 1m52s

Backend:
- Enterprise Agent refactored from single-round to ReAct multi-turn loop
- New agent.ts (LLM decision node) + tool-executor.ts (tool execution + Gen-UI)
- tool-defs.ts extracted for shared tool schemas
- MAX_ITERATIONS=6 safeguard against infinite loops

Frontend:
- MessageBubble: Markdown + code highlighting + LaTeX + tables
- ThemeToggle: light/dark/system theme cycling
- chart-result Gen-UI card: recharts bar/line/pie/area charts

Infrastructure:
- Docker Compose (lightweight): only LangGraph + Frontend, Azure cloud for PG/Redis/Blob
- Dockerfiles for dev (hot reload) and prod
- Makefile with dev/prod/down/logs commands
- Updated CLAUDE.md and agent definitions for LangGraph.js architecture

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gongzhiyong
2026-04-11 01:29:56 +08:00
co-authored by Claude Opus 4.6
parent 3263b15554
commit 251c6586f4
81 changed files with 4759 additions and 9008 deletions
+110
View File
@@ -0,0 +1,110 @@
# SOC Chat Clone - Local Docker (lightweight)
# 基础设施用 Azure 云服务,本地只运行 LangGraph Server + Frontend
#
# Usage:
# make dev - 开发模式(热重载)
# make prod - 生产模式
# make down - 停止
services:
# ============================================================
# Backend - Development (hot reload, source mount)
# ============================================================
langgraph-dev:
container_name: soc-langgraph-dev
profiles: ["dev"]
build:
context: ./langgraph
dockerfile: Dockerfile.dev
env_file:
- ./langgraph/.env
ports:
- "2024:2024"
volumes:
- ./langgraph/src:/app/src:cached
- ./langgraph/langgraph.json:/app/langgraph.json:ro
- ./langgraph/index.html:/app/index.html:ro
- ./langgraph/vite.config.ts:/app/vite.config.ts:ro
- ./langgraph/tsconfig.json:/app/tsconfig.json:ro
- ./langgraph/tsconfig.app.json:/app/tsconfig.app.json:ro
- ./langgraph/tsconfig.node.json:/app/tsconfig.node.json:ro
- ./langgraph/tailwind.config.js:/app/tailwind.config.js:ro
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:2024/ok || exit 1"]
interval: 10s
timeout: 5s
retries: 15
start_period: 30s
# ============================================================
# Backend - Production (optimized image)
# ============================================================
langgraph-prod:
container_name: soc-langgraph-prod
profiles: ["prod"]
build:
context: ./langgraph
dockerfile: Dockerfile.prod
env_file:
- ./langgraph/.env
ports:
- "2024:2024"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:2024/ok || exit 1"]
interval: 10s
timeout: 5s
retries: 15
start_period: 30s
restart: unless-stopped
# ============================================================
# Frontend - Development (Vite dev server with HMR)
# ============================================================
frontend-dev:
container_name: soc-frontend-dev
profiles: ["dev"]
build:
context: ./langgraph
dockerfile: Dockerfile.frontend.dev
environment:
- VITE_LANGGRAPH_URL=http://localhost:2024
ports:
- "5173:5173"
volumes:
- ./langgraph/src:/app/src:cached
- ./langgraph/index.html:/app/index.html:ro
- ./langgraph/vite.config.ts:/app/vite.config.ts:ro
- ./langgraph/tailwind.config.js:/app/tailwind.config.js:ro
- ./langgraph/tsconfig.json:/app/tsconfig.json:ro
- ./langgraph/tsconfig.app.json:/app/tsconfig.app.json:ro
- ./langgraph/tsconfig.node.json:/app/tsconfig.node.json:ro
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:5173 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
# ============================================================
# Frontend - Production (nginx + vite build)
# ============================================================
frontend-prod:
container_name: soc-frontend-prod
profiles: ["prod"]
build:
context: ./langgraph
dockerfile: Dockerfile.frontend.prod
args:
VITE_LANGGRAPH_URL: http://localhost:2024
ports:
- "3000:3000"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:3000 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped