Files
socaichat/langgraph/Dockerfile.prod
T
gongzhiyongandClaude Opus 4.6 0d97298b6a
Deploy LangGraph Server to Azure Web App / build-and-deploy (push) Failing after 13s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 51s
feat: web-read-progress Gen-UI card + production mode + security fixes
- Add web-read-progress Gen-UI card for real-time web reading feedback
- Searcher tool-executor pushes loading→complete cards during web_read
- ToolCallStatus supports expanding during loading state
- Switch from langgraphjs dev to production mode (server.ts)
- Add Hono middleware to strip sensitive request headers
- Bundle splitting via Vite manualChunks (1.85MB → 8 chunks)
- SPA fallback via staticwebapp.config.json
- Agent model configs updated (sonnet 1M → standard sonnet)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:18:05 +08:00

37 lines
812 B
Docker

# LangGraph Server - Production
# Multi-stage build for smaller image
FROM node:20-slim AS deps
WORKDIR /app
RUN npm install -g pnpm@10
COPY package.json pnpm-lock.yaml .npmrc ./
# Install production + dev dependencies (langgraphjs CLI is in dependencies)
RUN pnpm install --frozen-lockfile
# ---- Production image ----
FROM node:20-slim
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# LangGraph dev prerequisites
RUN touch .env && mkdir -p .langgraph_api
# Run as non-root
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 langgraph && \
chown -R langgraph:nodejs /app
USER langgraph
EXPOSE 2024
ENV PORT=2024
CMD ["./node_modules/.bin/tsx", "src/agent/server.ts"]