SPB Git

Repository Public

deployment.md 2.3 KB 51 lines markdown

1# Deployment and operations23| Item | Value |4|---|---|5| URL | https://orix.spboucher.ai |6| mld app | `orix-spboucher-ai` (manifest `M1M32:~/dispatch/apps/orix-spboucher-ai.json`) |7| Node | chosen by `mld` (first deployment: **m4mm**, port 8830) — check with `mld status` |8| Processes (PM2) | `orix-web` (`next start`), `orix-backup` (cron 03:40) |9| Code | `~/apps/orix-spboucher-ai` on the node, a git clone of `gitsrv:srv/git-private/orix-spboucher-ai.git` |10| Data | `~/apps-data/orix-spboucher-ai/` → `orix.db`, `uploads/`, `artifacts/` |11| Config | `~/apps/orix-spboucher-ai/.env` (600): `APP_URL`, `RP_ID`, `ORIX_DATA_DIR`, `SPBGIT_URL`, `SYNC_INTERVAL_MIN`, `WEBHOOK_SECRET` |12| Backups | `~/backups/orix-spboucher-ai/orix-*.tar.gz`, 14 days (database snapshot + uploads) |13| Gateway | Caddy route on BHS64 (`mld tunnel`), Let's Encrypt certificate, HTTP → HTTPS |14| Health | `GET /api/health` → `{ status, apps, sync: { last, stale } }` |1516## Updating the site (remote-first)1718```bash19ssh -A <node>20cd ~/apps/orix-spboucher-ai21git pull --ff-only22pnpm install --frozen-lockfile23node_modules/.bin/next build24pm2 restart orix-web25curl -s localhost:8830/api/health26```2728Catalog 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`.2930## First administrator3132```bash33cd ~/apps/orix-spboucher-ai && pnpm enroll        # prints a single-use link, valid 30 minutes34```3536Open the link on the device that should hold the passkey (Touch ID / Face ID). `pnpm enroll --recovery` replaces all passkeys.3738## Rollback3940- Code: `git checkout <previous commit> && node_modules/.bin/next build && pm2 restart orix-web`.41- A release: withdraw it in `/admin/releases`; the previous published version becomes the default download again.42- Data: stop `orix-web`, extract a backup archive over `~/apps-data/orix-spboucher-ai/`, start again.4344## Moving to another node4546Data 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`).4748## Monitoring4950`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`.51
Files main
Menu

Theme