fix: serve the website dist so Coolify answers GET /
All checks were successful
CI — Website / Website — typecheck, build (pull_request) Successful in 1m1s

Nixpacks built Vite but had no production start command, so Coolify returned Cannot GET /.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john kevin asprec
2026-08-17 22:27:25 +08:00
parent 5a79f1a2eb
commit efdae32ae1
16 changed files with 193 additions and 38 deletions

View File

@@ -6,7 +6,15 @@ This is the project’s shared, evidence-backed memory of mistakes worth prevent
`AGENTS.md` → `## Lessons` is the canonical active rule list loaded every session. Keep supporting evidence here; mirror an active rule here only when its detail is useful for maintenance. Keep at most 12 active rules, each short and imperative.
_No active guardrails yet._
### L-2026-08-17-01 — Serve website `dist/` on `0.0.0.0:$PORT`; do not use Vite preview in production
- **Status:** active
- **Trigger:** Coolify deploy of `packages/website` returned Express/Connect `Cannot GET /`.
- **Root cause / failure boundary:** No `start` script; Nixpacks built `dist/` then started a Node process that did not serve it. README Publish Directory `/dist` is an absolute empty path.
- **Prevention:** `packages/website/server.mjs` + `npm start`, or `packages/website/Dockerfile`. Coolify: Base Directory `packages/website`, static site off.
- **Evidence:** Local `node server.mjs` GET `/` → 200 with LexAI HTML; `/healthz` → 200.
- **Eval:** E-2026-08-17-01
- **Owner / review:** lead / after first successful Coolify deploy
## Recording policy