SPB Git

Repository Public

deployment.md 2.3 KB

# Deployment and operations

Item Value
URL https://orix.spboucher.ai
mld app orix-spboucher-ai (manifest M1M32:~/dispatch/apps/orix-spboucher-ai.json)
Node chosen by mld (first deployment: m4mm, port 8830) — check with mld status
Processes (PM2) orix-web (next start), orix-backup (cron 03:40)
Code ~/apps/orix-spboucher-ai on the node, a git clone of gitsrv:srv/git-private/orix-spboucher-ai.git
Data ~/apps-data/orix-spboucher-ai/ → orix.db, uploads/, artifacts/
Config ~/apps/orix-spboucher-ai/.env (600): APP_URL, RP_ID, ORIX_DATA_DIR, SPBGIT_URL, SYNC_INTERVAL_MIN, WEBHOOK_SECRET
Backups ~/backups/orix-spboucher-ai/orix-*.tar.gz, 14 days (database snapshot + uploads)
Gateway Caddy route on BHS64 (mld tunnel), Let's Encrypt certificate, HTTP → HTTPS
Health GET /api/health → { status, apps, sync: { last, stale } }

# Updating the site (remote-first)

bash
ssh -A <node>
cd ~/apps/orix-spboucher-ai
git pull --ff-only
pnpm install --frozen-lockfile
node_modules/.bin/next build
pm2 restart orix-web
curl -s localhost:8830/api/health

Catalog content is edited in /admin, not in git. pnpm seed only creates applications that do not exist yet; pnpm seed --overwrite replaces published documents with content/apps/*.json.

# First administrator

bash
cd ~/apps/orix-spboucher-ai && pnpm enroll        # prints a single-use link, valid 30 minutes

Open the link on the device that should hold the passkey (Touch ID / Face ID). pnpm enroll --recovery replaces all passkeys.

# Rollback

  • Code: git checkout <previous commit> && node_modules/.bin/next build && pm2 restart orix-web.
  • A release: withdraw it in /admin/releases; the previous published version becomes the default download again.
  • Data: stop orix-web, extract a backup archive over ~/apps-data/orix-spboucher-ai/, start again.

# Moving to another node

Data does not follow mld move. Copy ~/apps-data/orix-spboucher-ai and .env to the target first. The target must be a Mac (notarization checks use xcrun stapler and spctl).

# Monitoring

mld heal (every 5 minutes on the gateway) restarts missing PM2 processes and routes. The admin dashboard shows the last synchronizations, a stale flag, and the audit trail. Logs: pm2 logs orix-web.

Files main
Menu

Theme