SOP: Pausing Raxx dev compute
When we stop developing for the night / weekend / for a week, scale Heroku dynos to 0. This is the dominant cost lever. Everything else (Cloudflare Pages, DNS, Postgres essential-0) is free or $0.007/hour.
Toggle
# Pause everything paid
./scripts/ops/dev-pause.sh
# Resume staging only
./scripts/ops/dev-resume.sh
# Resume staging + prod (rare — only when deploying a release)
./scripts/ops/dev-resume.sh --with-prod
Requires HEROKU_API_KEY or HEROKU_API_KEY_PROD exported in your shell.
What happens when paused
| Service | State | Cost |
|---|---|---|
raxx-api-staging web dyno |
scaled to 0 | $0 |
raxx-api-prod web dyno |
scaled to 0 | $0 |
raxx-api-staging Postgres (essential-0) |
attached, idle | ~$0.007/hr, $5/mo cap |
raxx-api-prod Postgres (essential-0) |
attached, idle | ~$0.007/hr, $5/mo cap |
Cloudflare Pages (raxx.app, docs, marketing) |
live | free tier |
| Cloudflare DNS | live | free |
api.raxx.app / api-staging.raxx.app |
DNS still resolves, but returns 503 from Heroku router | free |
Rough ceiling while paused: ~$10/month (Postgres × 2). Everything else is $0 until dynos come back.
What to NOT do to "save more"
- Don't destroy Postgres add-ons unless you're pausing for months.
Re-attaching rewrites
DATABASE_URL, and you lose any data (currently empty; will matter once users sign up). - Don't remove the custom domains from Heroku. They don't cost anything idle, and re-adding them forces a new Let's Encrypt cert cycle.
- Don't disable Cloudflare proxy on
raxx.app. It's free and the SSL cert validation depends on it.
When someone hits the site while paused
https://raxx.app— Cloudflare Pages still serves the Antlers build (static HTML + JS). The app loads. API calls fail with 503.https://api.raxx.app/...— 503 "App sleeping or no web dynos running" from Heroku router.https://raxx.io— (future) docs site, always up.
If you want a friendly "paused for maintenance" banner instead of 503s, that's a console.raxx.app feature — toggle lives there. See the architecture doc once filed.
Morning checklist (resume dev)
./scripts/ops/dev-resume.sh- Wait for the script to confirm
/api/system/statusreturns 200 (~30s cold start) - Open https://raxx.app and verify the dashboard loads (no red toasts)
When to add prod to the toggle
Default: prod stays at 0. Only scale prod up when you're actively cutting
a release (v*.*.* tag pushed → GH Actions will bring it up anyway).
If you need a hot prod for an incident or QA session, run:
./scripts/ops/dev-resume.sh --with-prod
Fallback: emergency kill (everything down including Postgres)
Only if we need to zero out all bills mid-month:
heroku addons:destroy heroku-postgresql --app raxx-api-staging --confirm raxx-api-staging
heroku addons:destroy heroku-postgresql --app raxx-api-prod --confirm raxx-api-prod
This deletes the database. Use only when the data is either empty or has been exported. To restore, re-attach with:
heroku addons:create heroku-postgresql:essential-0 --app raxx-api-staging
heroku addons:create heroku-postgresql:essential-0 --app raxx-api-prod
New DATABASE_URL will be set automatically.