#!/usr/bin/env bash # File: deploy.sh # Path: infra/deploy.sh # Project: AI Risk Index — airiskindex.io # Author: Simon-Pierre Boucher # Contact: contact@spboucher.ai # Copyright © 2026 Simon-Pierre Boucher. All rights reserved. # # Description: Deploy script for the m3u96b node. # Deploy to m3u96b (staging/current prod) — CLAUDE.md §7. Run ON the node. set -euo pipefail cd /srv/airiskindex git pull --ff-only origin main pnpm install --frozen-lockfile pnpm build pnpm db:migrate:deploy sudo systemctl restart airiskindex-web airiskindex-worker sudo systemctl status airiskindex-web --no-pager # Localhost health, then the PUBLIC URL — tunnel failures are the most common outage cause. curl -fsS http://127.0.0.1:3000/api/v1/health curl -fsS https://www.airiskindex.io/api/v1/health echo "deploy OK"