Database branches, now on every plan

A full copy of your app for every pull request.

Hangar builds each branch with its own database, queues and seed data, posts the link on the pull request, and deletes everything when it merges.

310,000 previews a month for 1,900 engineering teams

Search⌘K

Previews

23 running · 4 building

feat/bulk-invoices · #1842

trellis-pr-1842.hangar.app · built from 9c1e4a2 · 3 min 12 s

Live
Services
web, api, worker
Database
Postgres, seeded, 1.2 GB
Sleeps after
30 min idle
Cost so far
$0.84
ServiceStateUp
webrunning2 h
apirunning2 h
workerrunning2 h
postgresbranch of staging2 h

Seed data is staging’s, with emails and names masked.

Open previewRestart

Activity

  1. 10:02PR #1842 opened by Maja
  2. 10:05Preview live, link posted on PR
  3. 11:40Design review: 3 comments

Comment on PR #1842

Preview ready
Link
trellis-pr-1842.hangar.app
Built in
3 min 12 s
Database
seeded from staging

Running on Hangar

  • Trellis
  • OKAPI
  • brightloom
  • Fathom Health
  • STRATA
  • Quayside

Review the change, not a screenshot of it

Every branch runs like production, with data.

  • Your services from the docker-compose file, a database branched from staging, queues and cron, behind one link.

    Preview #1842

    • web · Next.jsrunning
    • api · Gorunning
    • worker · Gorunning
    • postgres · branch1.2 GB
  • Each preview’s database is a copy-on-write branch of staging, masked, ready in seconds and deleted with the PR.

    8 s
    to a seeded database
    0
    real emails in previews

    Database for #1842

    1. 10:02:10Branched from staging (41 GB)
    2. 10:02:14Emails and names masked
    3. 10:02:15Migrations from the PR applied
    4. 10:02:18Ready, 1.2 GB of changes
  • Idle previews sleep after 30 minutes and wake on the next request, so 23 previews cost less than one staging server.

    Preview cost per PR

    $1.90

    median, November

    JulAugSepOctNov

Every branch, running like production

The app, its data and its link, from the pull request.

Masking rules · staging → previews

  • users.emailfake email
  • users.namefake name
  • invoices.ibanremoved
  • events.payloadkept

Data with no real people in it

Masking rules applied to every branch of staging.

PR #1842 · review

  1. 10:05Preview live
  2. 11:12Design: spacing on invoice list
  3. 11:40Support: tried bulk export, works
  4. 12:02Approved

Reviewed by everyone

Design, support and product, before merge.

Previews this week

23 live

96 built

BuiltSlowFailed

Builds you can count on

Every preview this week, at a glance.

Connected

12 sources
  • GitHubConnected
  • GitLabGit
  • BitbucketGit
  • PostgresOn
  • MySQLSnapshots

Fits your repository

Reads your compose file, posts where you review.

“We ran two staging servers that nobody trusted. Now each PR is its own.”

Diego Alvarez, Platform lead · OKAPI

−2staging servers

Teams on Hangar

That merged their staging queue away.

[ On every push ]

From a commit to a link in three minutes.

Hangar builds the branch, branches the database from staging, masks it, runs your migrations and posts the link on the pull request.

3 min 12 s
build to link
8 s
database
1
comment on the PR
preview #1842 · 25 Nov 10:023 min 12 s
10:02:01doneBUILDweb, api, worker from 9c1e4a2
10:02:10doneDBbranched from staging · 41 GB
10:02:14doneMASK18,240 emails and names masked
10:04:50noteMIGRATE1 migration · 22 s
10:05:13newLINKposted on PR #1842

[ Pricing ]

Pay for the minutes previews run

Sleeping previews are free.

MonthlyYearly−15%

Hobby

Side projects

$05 previews

Public repos

Connect GitHub
  • Frontend and API
  • Shared database

Team

Most teams

Product teams

$20per developer / month

Plus compute used

Connect GitHub
  • Database branches
  • Masked seed data
  • Sleep when idle

Enterprise

Runs in your cloud

Customyearly

Your own cloud

Talk to us
  • Runs in your AWS
  • SSO and audit
Do we need Kubernetes?

No. Hangar reads your docker compose file and runs it; nothing to install in your cluster.

Where does the data come from?

A copy-on-write branch of your staging database, masked by rules you set, so it takes seconds and little space.

What does it cost to leave previews up?

Nothing while they sleep; they wake on the next request in about four seconds.

Can it run in our AWS?

Yes, on Enterprise, with the same dashboard.

Every PR, running.

Connect a repository and your next pull request gets a link with its own database.

5 previews free · no card

Your first day, in three steps

  1. Connect GitHubone repository · 1 min
  2. Point at your compose fileauto-detected
  3. Open a pull requestlink in 3 minutes
Previews live1