Runbook
Ownership (template)
| Area | Owner / team | Notes | | --------------- | ------------ | ------------------------------ | | Vercel project | Your team | Domains, env vars, deploy logs | | Postgres (Neon) | Your team | Connection strings, branches | | R2 bucket | Your team | CORS, public URLs | | PostHog project | Your team | API keys, dashboards | | Sentry project | Your team | DSN, alerts |
Deploys and rollback
- Normal deploy: merge to main → Vercel production deploy.
- Rollback: Vercel Dashboard → Deployments → select last good deployment → Promote to Production. No git revert required for infra-only rollback.
- Code revert:
git revertthe bad commit and push; Vercel redeploys automatically.
Database backups
Neon and Vercel Postgres provide automatic backups and point-in-time recovery (plan-dependent). Confirm retention and restore steps in the provider console for your plan.
Restore (conceptual): use the provider’s “Restore branch” / PITR UI to a new branch or database, then point POSTGRES_URL at the restored instance until data is reconciled.
Uptime
- Vercel includes basic monitoring and alerts on failed deploys / function errors.
- For external checks (status page, multi-region ping), add UptimeRobot or similar against
https://learn.askelephant.ai/libraryand optionally/api/healthif you add a health route later.
Incidents
- Check Vercel function logs and Sentry (if enabled).
- Verify Postgres connectivity and R2 CORS if playback fails only in certain origins.
- Disable risky flags via env (e.g. unset PostHog keys only affects analytics, not playback).
PostHog dashboard (recommended)
In PostHog, create:
- Trends:
audio_play_startedbyproperties.resource_id, broken down bysource. - Funnel:
audio_play_started→audio_progress_100(approximate completion proxy). - Insights:
library_searchedbyquery(watch for PII; trim or hash if needed).