SPB Git

spb/airiskindex

Public

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

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 (Aug 5, 2026) parent 70bc880 Browse files

1 changed file +20 −14

Unified Split
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 The app currently runs on the self-hosted node `m3u96b` and is exposed publicly through an ngrok tunnel mapped to `www.airiskindex.io`. 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:** 131+**Process layout on m3u96b (macOS node — PM2, not systemd; deployed 2026-08-05):**
132−- `airiskindex-web.service` (systemd) → `node apps/web/.next/standalone/server.js` on `127.0.0.1:3000` 132+- App dir: `~/apps/airiskindex` (deployed by rsync from the laptop — no git remote yet)
133−- `airiskindex-worker.service` → BullMQ worker 133+- `airiskindex-web` (PM2) → `./run-web.sh` → `next start -p 3000` (cwd `apps/web`)
134−- `postgres` + `redis` via Docker Compose (`infra/docker-compose.prod.yml`) 134+- `airiskindex-ngrok` (PM2) → `./run-ngrok.sh` → `ngrok http 3000 --url=https://www.airiskindex.io`
135−- `ngrok.service` → tunnel `127.0.0.1:3000` → public edge 135+- `postgresql@16` + `redis` via `brew services` (NOT Docker on this node)
136− 136+- Worker (`airiskindex-worker`) not started yet — starting it submits a live Anthropic rating batch
137−**Deploy procedure (scripted in `infra/deploy.sh`):** 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 ```bash 142 ```bash
139−ssh m3u96b 143+# from the laptop
140−cd /srv/airiskindex 144+rsync -az --delete --exclude node_modules --exclude .next --exclude .turbo \
141−git pull --ff-only origin main 145+ --exclude .env --exclude "data/raw/*" ~/Desktop/airiskindex/ M3U96b:apps/airiskindex/
142−pnpm install --frozen-lockfile 146+ssh M3U96b
147+cd ~/apps/airiskindex
148+pnpm install --no-frozen-lockfile
143 pnpm build 149 pnpm build
144−pnpm db:migrate:deploy # prisma migrate deploy (no interactive) 150+set -a && . ./.env && set +a && pnpm db:migrate:deploy
145−sudo systemctl restart airiskindex-web airiskindex-worker 151+pm2 restart airiskindex-web && pm2 save
146−sudo systemctl status airiskindex-web --no-pager # verify healthy
147 curl -fsS http://127.0.0.1:3000/api/v1/health # must return {"ok":true,...} 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 **ngrok configuration (`infra/ngrok.yml`, copied to `/etc/ngrok/ngrok.yml` on the node):** 156 **ngrok configuration (`infra/ngrok.yml`, copied to `/etc/ngrok/ngrok.yml` on the node):**
151 157
Menu

Theme