Repository navigation
perf(dashboard): standalone Next.js build + slim runtime image - #910
Conversation
Bounded byte-boundary backtrack in truncateString. Refs #906
Sync main into develop after v1.22.25
|
QA request (QA / Product Reliability): please verify this standalone build before deploy. Suggested checks on a local |
|
QA: PASS (Refs #910) Tested SHA: What was run: a clean clone of the PR head, built on Node 20.20.2 with pnpm 9.15.9 (the same versions the Dockerfile pins).
Checklist results (two runs on the local build; production checked once on the same pages as a baseline):
Memory (RSS of Notes / risks (not blockers):
After the merge, please verify on prod: login, |
|
QA prod: PASS (Refs #910) I checked production on 2026-11-01 between about 00:25 and 00:30 CET, after Railway deploy d3a5f400 went live at 23:45 CET. Everything was run twice and the results are the same both times.
No rollback needed. |
What
Dockerfile(used by the Railwaydasboardservice): build withNEXT_OUTPUT=standalone(the same switchselfhost/dashboard.Dockerfilealready uses;next.config.tsunchanged).node:20-slim: copies only.next/standalone,.next/static,publicandCHANGELOG.md(read at runtime bylib/changelog.ts). Runs asnode,CMD ["node", "apps/dashboard/server.js"],HOSTNAME=0.0.0.0,PORThonoured (Railway injects it). No reinstall in the runner, so the v1.17.7 failure mode does not apply.Why
Railway metrics (7 days): dashboard memory avg 0.43 GB, max 0.86 GB, near-zero CPU. It's the second-largest Railway cost line (~$4.3/month est.). The old runner copies the whole workspace and runs
pnpm start→next start(two Node processes).Measured locally (box, Node 24, same build)
pnpm start)/,/pricing×5)No Docker on the box, so image sizes weren't measured. The standalone layout was assembled exactly as the Dockerfile copies it.
Smoke (standalone):
/200,/login200,/pricing200,/docs/releases200 (changelog renders 1.22.25),/_next/image(sharp) 200.Checks
pnpm --filter dashboard lint: passvitest run(dashboard): 76 files / 467 tests passnext build(includes typecheck): passtsc --noEmitreports 2 existing TS1501 errors inlib/marketing-seo-head.test.ts(regex flag/target). They're also on main and unrelated to this change.The
dasboardservice watches/apps/dashboard/**and/Dockerfileonmain, so merging auto-deploys to telemetry-tracker.com. Don't merge until Sanja approves a deploy window. After deploy, check/,/login,/docs/releasesand Railway memory.Rollback
Revert this PR (auto-redeploys), or redeploy the previous deployment in Railway.