SPB Git forge

spb/cancerindex

Public
37commits 1branches 0releases
2.9 MBsize
maindefault branch
10 days agolast push
TypeScript 97.2% SQL 1.5% CSS 0.6% JavaScript 0.5%

deploy: production moved to OVH BHS128b (native PM2/Postgres), release procedure; Mac copy kept cold

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed 10 days ago (Sep 14, 2026) parent 91a859e

2 changed files +15 −4

modified CLAUDE.md +5 −4
@@ -78,9 +78,10 @@ pnpm dev:api & pnpm dev:web
78 78 ```
79 79
80 80 ## Deployment
81 −MacLustr cluster via `mld` (gateway M1M32): manifest `~/dispatch/apps/cancerindex.json`,
82 −`mld stage <dir> cancerindex` then `mld deploy cancerindex`. Web :8250, API :8251, PM2 processes
83 −`cancerindex-web|api|worker|backup`, domain www.cancerindex.io served by the MacLustr Tunnel
84 −(WireGuard + Caddy on BHS64; no ngrok). Postgres 17 + pgvector on the node, database `cancerindex`.
81 +**Since 2026-09-14: OVH server BHS128b** (`ssh BHS128b`, Ubuntu 24.04), outside `mld` — code `~/apps/cancerindex`, Postgres 17 + pgvector
82 +native (db/role `cancerindex`), PM2 under systemd (`~/apps/pm2.cancerindex.config.cjs`, generated from the mld manifest kept in
83 +`~/apps/.manifests/`). Web :8250, API :8251, PM2 processes `cancerindex-web|api|worker|backup`, domain www.cancerindex.io served by the
84 +MacLustr Tunnel (BHS64 Caddy → wg1 10.67.0.62:8250). Release procedure: `deploy/README.md` (rsync + pnpm install + migrate + build + pm2 restart).
85 +Former home: MacLustr node M4M64b via `mld` (manifest `~/dispatch/apps/cancerindex.json`), kept as a cold copy.
85 86 Source of truth for the code: spbgit `cancerindex.git`. Daily maintenance (UTC, worker): counters
86 87 06:00 → intelligence 06:15 → rankings 06:30; `pnpm cix intel` recomputes the derived layer by hand.
modified deploy/README.md +10 −0
@@ -1,5 +1,15 @@
1 1 # Deploying CancerIndex on the MacLustr cluster
2 2
3 +> **Since 2026-09-14 production runs on the OVH server BHS128b** (`ssh BHS128b`, ubuntu@51.161.112.85, Ubuntu 24.04, 16 threads / 128 GB),
4 +> outside `mld`: code in `~/apps/cancerindex`, Postgres 17 native (db/role `cancerindex`/`cancerindex`, pgvector + pg_trgm + unaccent, en_US.UTF-8),
5 +> raw lake + backups under `~/apps/cancerindex/{data,backups}`, PM2 under systemd (`pm2-ubuntu`) with `~/apps/pm2.cancerindex.config.cjs` generated
6 +> from the mld manifest by `~/apps/.manifests/gen-pm2.py` (secrets, 0600). Tunnel route: `mlt add www.cancerindex.io BHS128b:8250`
7 +> (BHS64 Caddy → wg1 10.67.0.62); firewall `ufw allow in on wg1 from 10.67.0.1 to any port 8250 proto tcp`.
8 +> **Release on BHS128b**: `rsync -az --exclude node_modules --exclude .git --exclude 'apps/web/.next' --exclude data --exclude backups --exclude logs . BHS128b:apps/cancerindex/`
9 +> then `ssh BHS128b 'cd apps/cancerindex && pnpm install --frozen-lockfile && DATABASE_URL=postgres://cancerindex:cancerindex@127.0.0.1:5432/cancerindex pnpm db:migrate && NODE_ENV=production NEXT_PUBLIC_SITE_URL=https://www.cancerindex.io CI_API_URL=http://127.0.0.1:8251 DATABASE_URL=postgres://cancerindex:cancerindex@127.0.0.1:5432/cancerindex pnpm --filter @cancerindex/web build && pm2 restart cancerindex-api cancerindex-web cancerindex-worker && pm2 save'`.
10 +> pnpm ≥ 10 needs `onlyBuiltDependencies` (esbuild, sharp, @tailwindcss/oxide, unrs-resolver) in `pnpm-workspace.yaml` on a fresh install.
11 +> The M4M64b copy (code, Postgres `cancerindex`) is kept as a cold copy, retired from `mld` (`--keep-dir`); the `mld` procedure below still describes it.
12 +
3 13 Everything goes through the gateway **M1M32** and the `mld` orchestrator (`~/Desktop/cluster-skill/mld`
4 14 on the laptop relays to `M1M32:~/dispatch`). Nothing in this folder runs on the cluster by itself;
5 15 these are the files and the procedure.
6 16