3.2 KiB
LexAI website
Marketing site for the LexAI monorepo: Home, Docs, Contribute, Community.
Develop
# from repo root
npm run website:install
npm run website:dev
Or inside this package:
npm install
npm run dev
Build
npm run website:build
# → packages/website/dist/
Preview production build locally: npm run website:preview (Vite, localhost only).
Production start (what Coolify should run): npm start — serves dist/ on 0.0.0.0:$PORT (default 3000).
Uses BrowserRouter. Production nginx/Node serve /docs, /contribute, and /community as real paths (legacy #/docs links rewrite on load). Unknown paths return HTTP 404.
Deploy on Coolify
This package is a static Vite build. No LexAI API keys or env vars. Do not add LEXAI_API_KEY.
Cannot GET / means Coolify started a Node process that is not serving dist/ (no start command, or "static site" pointed at the wrong folder). Fix: use one of the two setups below, then Redeploy.
Required on either setup
- + New → Resource → Private Repository (with deploy key) (Gitea).
- Repo SSH URL, for example
git@git.juankibin.space:kibin/LexAI.git. If Gitea SSH is not on port 22, usessh://git@git.juankibin.space:PORT/kibin/LexAI.git. - Add Coolify’s public deploy key to the Gitea repo: Settings → Deploy / Access Keys (read-only).
- Branch:
devormain. - Base Directory:
packages/website— no leading slash. Rootnpm run buildbuilds Chrome, not this site. - Optional Watch Paths:
packages/website. - Set the domain, deploy, open
https://lexai.juankibin.space/(docs:/docs).
Option A — Dockerfile (recommended)
- Build Pack: Dockerfile.
- Leave Is it a static site? off.
- Ports Exposes:
80. - If Coolify asks for a Dockerfile path:
packages/website/Dockerfile(or omit it when Base Directory is alreadypackages/website).
Option B — Nixpacks
- Build Pack: Nixpacks.
- Leave Is it a static site? off. Nixpacks runs
npm run buildthennode server.mjs. - Start command (if the field is shown):
npm startornode server.mjs. - Ports Exposes:
3000. - Optional env:
NIXPACKS_NODE_VERSION=22. Do not setNODE_ENV=productionat build time — Vite is a devDependency andnpm ciwould skip it.
Do not tick "Is it a static site?" with Publish Directory /dist. The leading slash is an absolute path (/dist on the container), which is empty, and Coolify then answers Cannot GET /.
If you already created the resource: uncheck static site, set Base Directory and port as above, then Redeploy (no need to recreate the app).
Auto-deploy: Coolify resource → Webhooks → copy the URL + secret into Gitea Settings → Webhooks (push events).
Google Search
After the site is live on https://lexai.juankibin.space/:
- Open Google Search Console, add a URL-prefix property for that origin, and verify (HTML file or DNS).
- Sitemaps → submit
https://lexai.juankibin.space/sitemap.xml. - URL inspection → request indexing for
/and/docs.
Crawlers should see Allow: / at /robots.txt and unique titles on /, /docs, /contribute, and /community.