Skip to content

Commit 59537d4

Browse files
committed
fix: address review findings for Render deployment
- Switch agent from langgraph dev to production Docker image (langchain/langgraph-api) - Add health check endpoint (/ok) for agent private service - Add turbo.json to frontend buildFilter to prevent stale builds - Add Dockerfile.agent for production agent builds - Revert serverId to example_mcp_app for traceability
1 parent a73ebbc commit 59537d4

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

apps/app/src/app/api/copilotkit/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const POST = async (req: NextRequest) => {
6262
servers: [{
6363
type: "http",
6464
url: process.env.MCP_SERVER_URL,
65-
serverId: "mcp_app",
65+
serverId: "example_mcp_app",
6666
}],
6767
},
6868
}),

docker/Dockerfile.agent

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM langchain/langgraph-api:3.12
2+
3+
ADD apps/agent /deps/agent
4+
5+
RUN for dep in /deps/*; do \
6+
echo "Installing $dep"; \
7+
if [ -d "$dep" ]; then \
8+
(cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); \
9+
fi; \
10+
done
11+
12+
ENV LANGSERVE_GRAPHS='{"sample_agent": "/deps/agent/main.py:graph"}'
13+
14+
RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license \
15+
&& touch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py
16+
RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir --no-deps -e /api
17+
18+
WORKDIR /deps/agent

render.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@ services:
22
# ── Agent (LangGraph Python) — private, not exposed to internet ──
33
- type: pserv
44
name: open-generative-ui-agent
5-
runtime: python
5+
runtime: docker
66
plan: starter
7-
rootDir: apps/agent
8-
buildCommand: "pip install uv && uv sync --frozen"
9-
startCommand: "uv run langgraph dev --host 0.0.0.0 --port $PORT --no-browser --no-reload"
7+
dockerfilePath: docker/Dockerfile.agent
8+
healthCheckPath: /ok
109
envVars:
11-
- key: PYTHON_VERSION
12-
value: "3.12"
1310
- key: OPENAI_API_KEY
1411
sync: false
1512
- key: LANGSMITH_API_KEY
1613
sync: false
1714
buildFilter:
1815
paths:
1916
- apps/agent/**
17+
- docker/Dockerfile.agent
2018

2119
# ── Frontend (Next.js) — public web service ──
2220
- type: web
@@ -37,4 +35,5 @@ services:
3735
- apps/app/**
3836
- package.json
3937
- pnpm-lock.yaml
38+
- turbo.json
4039
- docker/Dockerfile.app

0 commit comments

Comments
 (0)