SPB Git

spb/airiskindex Public

The most methodologically rigorous, fully transparent AI job-exposure index.

TypeScript 88% Python 6.1% SQL 2.7% CSS 1.2% JavaScript 0.9% Shell 0.8%

docs: update deploy section to actual m3u96b layout (PM2 + brew services, no systemd/Docker)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
simon-pierre boucher committed 5 days ago (Aug 5, 2026) parent 70bc880

Showing 1 changed file with +20 and −14

modified CLAUDE.md +20 −14
@@ -128,23 +128,29 @@ Task automatability ratings are produced by an LLM rater in `apps/worker/src/rat
128 128
129 129 The app currently runs on the self-hosted node `m3u96b` and is exposed publicly through an ngrok tunnel mapped to `www.airiskindex.io`.
130 130
131 **Process layout on m3u96b:**
132 - `airiskindex-web.service` (systemd) → `node apps/web/.next/standalone/server.js` on `127.0.0.1:3000`
133 - `airiskindex-worker.service` → BullMQ worker
134 - `postgres` + `redis` via Docker Compose (`infra/docker-compose.prod.yml`)
135 - `ngrok.service` → tunnel `127.0.0.1:3000` → public edge
136
137 **Deploy procedure (scripted in `infra/deploy.sh`):**
131 +**Process layout on m3u96b (macOS node — PM2, not systemd; deployed 2026-08-05):**
132 +- App dir: `~/apps/airiskindex` (deployed by rsync from the laptop — no git remote yet)
133 +- `airiskindex-web` (PM2) → `./run-web.sh``next start -p 3000` (cwd `apps/web`)
134 +- `airiskindex-ngrok` (PM2) → `./run-ngrok.sh``ngrok http 3000 --url=https://www.airiskindex.io`
135 +- `postgresql@16` + `redis` via `brew services` (NOT Docker on this node)
136 +- Worker (`airiskindex-worker`) not started yet — starting it submits a live Anthropic rating batch
137 +- `.env` at repo root (chmod 600), symlinked into `apps/web/.env`, `packages/db/.env`, `apps/worker/.env`
138 + (Next.js and Prisma each load env from their own directory in a monorepo)
139 +- Registered in `~/Desktop/cluster-skill/cluster-deployments.json`
140 +
141 +**Deploy procedure:**
138 142 ```bash
139 ssh m3u96b
140 cd /srv/airiskindex
141 git pull --ff-only origin main
142 pnpm install --frozen-lockfile
143 +# from the laptop
144 +rsync -az --delete --exclude node_modules --exclude .next --exclude .turbo \
145 + --exclude .env --exclude "data/raw/*" ~/Desktop/airiskindex/ M3U96b:apps/airiskindex/
146 +ssh M3U96b
147 +cd ~/apps/airiskindex
148 +pnpm install --no-frozen-lockfile
143 149 pnpm build
144 pnpm db:migrate:deploy # prisma migrate deploy (no interactive)
145 sudo systemctl restart airiskindex-web airiskindex-worker
146 sudo systemctl status airiskindex-web --no-pager # verify healthy
150 +set -a && . ./.env && set +a && pnpm db:migrate:deploy
151 +pm2 restart airiskindex-web && pm2 save
147 152 curl -fsS http://127.0.0.1:3000/api/v1/health # must return {"ok":true,...}
153 +curl -fsS https://www.airiskindex.io/api/v1/health # ALWAYS check the public URL too
148 154 ```
149 155
150 156 **ngrok configuration (`infra/ngrok.yml`, copied to `/etc/ngrok/ngrok.yml` on the node):**
151 157