Skip to content
homeport

Docs · Deploy

Preview deployments

Turn on preview deployments for an app and each pull or merge request gets its own copy of the app, at its own address, with a branch of its database. Previews are private to your team unless you open them.

Turn them on

In a connected app’s Settings, turn on Preview deployments. Turning them on asks you which of production’s variables previews should get (below). They are on paid plans:

Previews at once, per plan
PlanPreviews at once
FreeNone
Starter1
Growth5
Business20

Past that, the pull request is told which plan has more. Previews do not count toward your plan’s apps or environments.

What a preview is

  • It answers at your-app-pr-12.homeport.run, for pull request 12, and the pull request gets a comment with the address, kept up to date.
  • Each push to the pull request builds it again.
  • It runs at the smallest size, 256 MB and 25% of a core, and sleeps when idle. It is billed like any app, for the time it is awake.
  • It is deleted when the pull request is closed or merged, when previews are turned off, or after 7 days with no push and no visit.
  • Pull requests from forks are never built: their code would run with your variables. Push the branch to your own repository to preview it.

Who can open it

By default only your team can. A visitor is sent to sign in to homeport, and let through if they are a member of the app’s team. To share previews with a client or a tester, turn on Make previews public in the app’s Settings: then anyone with the link can open them. Search engines are told not to index previews either way.

Variables, chosen one by one

For each of production’s variables, you choose what previews get:

  • Copy: production’s value.
  • Use a different value: one you type once, for previews only. Like any variable, it is never shown again.
  • Leave out.

A name you have not chosen for is left out, including a variable added to production later. Names that look sensitive, such as keys, tokens, passwords and database addresses, are marked to check. Change your choices in the Previews section of production’s Variables page; live previews get the change at once. Global variables reach previews as they reach any environment.

A branch of the database

When the environment a preview comes from has a database, the preview gets a branch of it: a copy of its data that the preview can change without touching the original. It sleeps when idle like any database, is billed as database compute and storage, and is deleted with the preview.

  • Up to 9 previews of the same database get a branch at once. Another runs without one, and its comment says why.
  • A database made on Free is never branched.
  • homeport env pull never pulls a preview’s database: it is a copy of production’s data.