by Ta-Tech Solutions All documents

Operations Runbook

How to run, deploy, monitor, and recover CivicLoop County OS. Companion to COUNTY_OS.md.

Environments

Deploy

Manual CLI (the app site does NOT auto-deploy from GitHub and a build hook does not trigger a build):

cd web && netlify deploy --build --prod --site=e1d84f28-2e39-4f34-98ab-5749dd77e286

Release gate (every change)

  1. npm run build locally, exit 0.
  2. node scripts/ui-sweep.mjs against the deploy (or local) - zero uncaught JS errors.
  3. Click through the changed surface in dev.
  4. Deploy. Re-run node scripts/prod-smoke.mjs against prod. No em-dashes anywhere (the docs builder fails the build on one).

Environment variables

Var Purpose If unset
ANTHROPIC_API_KEY AI co-pilot, bid scoring, County assistant AI features fail safe (no crash)
AUTOMATION_SECRET gate /api/automations + /api/cron/synthetic endpoints return 503
FEEDS_INGEST_SECRET gate /api/feeds/ingest endpoint returns 503
SENTRY_DSN / NEXT_PUBLIC_SENTRY_DSN error tracking Sentry is a no-op
SYNTHETIC_BASE_URL synthetic monitor target defaults to prod URL
Twilio / Resend keys SMS + email notifications notifications log as "provider not configured"

Scheduled jobs (cron)

Point any scheduler (Supabase pg_cron + pg_net, a Netlify scheduled function, GitHub Action) at:

Monitoring

Incident response

  1. Check the dashboard health panel + Sentry issues.
  2. Reproduce with node scripts/ui-sweep.mjs DEMO_APP_URL=https://civicloop-pgc.netlify.app.
  3. If a deploy regressed: roll back to the previous deploy in the Netlify UI (Deploys -> Publish deploy), then fix forward.
  4. DB issues: inspect via the Supabase dashboard / MCP get_logs + get_advisors. RLS is on; never disable it to "fix" a read - grant the right policy.

Backups & data

PreviousUser Manual
CivicLoop - Ta-Tech Solutions - Architecture & Design Documentation