Raxx · internal docs

internal · gated ↑ index

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"

When someone hits the site while paused

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)

  1. ./scripts/ops/dev-resume.sh
  2. Wait for the script to confirm /api/system/status returns 200 (~30s cold start)
  3. 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.