fix(blueprints): rework deploy/docker to use the LangGraph CLI (the old one didn't work)#278
Conversation
…mage via langgraph-cli The old guide hand-rolled a Dockerfile with a fictional 'node .dawn/build/server.js' CMD (Dawn produces langgraph.json, not a server) and a failing prod install. Delegate to @langchain/langgraph-cli (langgraphjs dockerfile/build) against the dawn-build artifact, matching deployment.mdx self-hosting guidance. Honest about the LangGraph platform runtime (Postgres/Redis/license). Version 1 -> 2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 1m 46s —— View job PR Review — fix(blueprints): rework deploy/docker to use LangGraph CLI
SummaryThe approach is correct and this is a real fix — the old blueprint was broken by design (no standalone server, One correctness bug in the guide text, two minor issues. Issues1.
|
| Location | Current (inconsistent) | Should be |
|---|---|---|
| Step 3 — generate Dockerfile | npx @langchain/langgraph-cli dockerfile ./Dockerfile |
pnpm exec langgraphjs dockerfile ./Dockerfile |
| Step 4 — one-step build | npx @langchain/langgraph-cli build -t my-dawn-app |
pnpm exec langgraphjs build -t my-dawn-app |
| Verify step 2 — local run | npx @langchain/langgraph-cli up |
pnpm exec langgraphjs up |
| Updating step 2 — regenerate | npx @langchain/langgraph-cli dockerfile ./Dockerfile |
pnpm exec langgraphjs dockerfile ./Dockerfile |
All four should use pnpm exec langgraphjs (with npm exec langgraphjs / yarn langgraphjs shown as alternates, matching the install section's pattern). Fix this →
2. .gitignore instruction contradicts the "hand-authored" alternative (minor)
The guide says: "Add the generated copy to .gitignore (or keep a hand-authored root langgraph.json — Dawn shallow-merges it on build)" then immediately tells users to run echo 'langgraph.json' >> .gitignore. If a user chooses the hand-authored path they should NOT add it to .gitignore. Consider splitting the two cases:
# If generated (copy from .dawn/build) — don't commit it:
echo 'langgraph.json' >> .gitignore
# If hand-authored (Dawn merges it) — commit it instead.
3. docker@1 → docker@2 migration path is implicit (minor)
The "Inspect" step says: "If it is # dawn-blueprint: docker@1, this is an older version — proceed with the steps below to regenerate it." but "Updating an existing install" only covers docker@2. Users hitting this from v1 might not realize that their old Dockerfile is completely replaced (not patched), and that the runtime requirements have fundamentally changed (now needs Postgres + Redis). A one-sentence callout at the start of the update section would help: "Note: upgrading from v1 to v2 is a full replacement — the old image cannot run without Postgres and Redis."
What looks good
- Path-resolution gotcha is clearly documented and the
cp .dawn/build/langgraph.json ./langgraph.jsonfix is the right solution - Platform requirements (Postgres, Redis, license key) disclosed upfront — correct and honest
pnpm.onlyBuiltDependencies: ["esbuild"]check preempts theERR_PNPM_IGNORED_BUILDSfailure- Version bump to
version: 2and updated marker are properly done - No secrets in the image;
.env.examplepattern is correct
The blocker is issue #1. #2 and #3 are polish but not blocking.
Summary
A full docker test of the shipped
deploy/dockerblueprint proved it does not produce a working container: it hand-rolled a multi-stage Dockerfile withCMD ["node", ".dawn/build/server.js"]— butdawn buildemitslanggraph.json, not a server (Dawn has no standalone HTTP server) — and itspnpm install --prodfailed (ERR_PNPM_IGNORED_BUILDS: esbuild).This reworks the blueprint to the validated correct approach (I verified each step against a real scaffolded app):
@langchain/langgraph-cli(langgraphjs dockerfile/build) against thedawn buildartifact — matching Dawn's owndeployment.mdxself-hosting guidance.langgraph.jsonwith root-relative graph paths, so it must sit at the app root orlanggraphjsdoubles the path (.dawn/build/.dawn/build/...).FROM langchain/langgraphjs-api:22) and is honest about the runtime: it needs Postgres + Redis + a LangGraph/LangSmith license (langgraphjs upprovisions them) — not a trivialnode server.js.version 1 → 2; marker# dawn-blueprint: docker@2.Pairs with #277 (which adds
pnpm.onlyBuiltDependencies: ["esbuild"]to scaffolds, so the in-imagepnpm isucceeds).Test Plan
pnpm --filter web exec vitest run app/blueprints(11) — validator + catalog + marker checks passlanggraphjs dockerfilegenerates a real Dockerfile from a Dawnlanggraph.jsonapps/web/content/blueprints/deploy/docker.mdchanged (website content; no changeset needed)🤖 Generated with Claude Code