mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 11:28:22 +01:00
OrangeCat is a hand-rolled snowflake on bitbaum (not in fleetcrown's apps.conf, no push-deploy hook) so it was the only fleet app still deployed by hand — its safe atomic-swap+rollback flow lived only in the runbook prose + ad-hoc SSH. - scripts/deploy-selfhost.sh: the deploy verb, committed. build → assemble → rsync to staging → boot-test on :4099 → atomic swap (keeps app-old) → restart → health-check → auto-rollback → verify public. Proven flow from the runbook. Safer than fleetcrown/scripts/hetzner/deploy.sh (which rsyncs over the live tree with no rollback) — that pattern should be promoted into the shared verb. - .github/workflows/cd.yml: GH-Actions CD after green CI, builds standalone off-box (the box OOMs on build) and ships via the script. DORMANT by design — every step gated on the SELFHOST_SSH_KEY secret, so merging is a safe no-op until deploys are opted into. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Scripts Directory
This directory contains all automation scripts organized by purpose.
Directory Structure
analysis/- Bundle analysis, documentation checking, and optimization toolsauth-fix/- Scripts to fix authentication and RLS policy issuesdb/- Database operations, migrations, and schema management- Migration scripts moved from root:
apply-migration.js,apply-*-migration.js - Old schema files archived in
db/archive/
- Migration scripts moved from root:
deployment/- Deployment, production setup, and monitoring scriptsdev/- Development helpers, local setup, and debugging toolsdiagnostics/- Health checks and system diagnosticsmaintenance/- Cleanup, optimization, and maintenance scriptsmonitoring/- Performance monitoring and bundle size trackingoauth/- OAuth provider setup and configurationprofile-fix/- Scripts to fix profile-related issuesschema-fix/- Database schema fixes and migrationsstorage/- Supabase storage bucket setup and managementtest/- Testing utilities and validation scripts- Test/debug scripts moved from root:
test-*.js,check-*.js,debug-*.js
- Test/debug scripts moved from root:
Usage
Most scripts can be run with:
node scripts/{category}/script-name.js
For deployment scripts:
bash scripts/deployment/script-name.sh
Important Scripts
scripts/dev/dev-start.js- Main development server starterscripts/deployment/browser-verify.js- Post-deploy browser smoke test (deploys themselves happen on the box — see docs/deployment/DEPLOYMENT_PROCESS.md)scripts/db/apply-migrations.ts- Database migrationsscripts/maintenance/cleanup-console-logs.ts- Remove console.log statements