| 1 | # Deploying CancerIndex on the MacLustr cluster |
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 | Everything goes through the gateway **M1M32** and the `mld` orchestrator (`~/Desktop/cluster-skill/mld` |
13 | Everything goes through the gateway **M1M32** and the `mld` orchestrator (`~/Desktop/cluster-skill/mld` |
| 4 | on the laptop relays to `M1M32:~/dispatch`). Nothing in this folder runs on the cluster by itself; |
14 | on the laptop relays to `M1M32:~/dispatch`). Nothing in this folder runs on the cluster by itself; |
| 5 | these are the files and the procedure. |
15 | these are the files and the procedure. |
| 6 | |
16 | |