Branch previews
Push a new branch, and CTRL deploys it as a preview at its own URL. You can try the change before it reaches production.
When a preview is made#
A push creates a preview when both of these hold:
- The repo has an app in your default project's production environment. That app is the preview's parent. Apps in other projects or environments never make previews.
- No app follows that branch yet. If one does, the push redeploys that app instead.
Later pushes to the branch redeploy the preview.
What a preview gets#
- Its own URL:
<login>-<repo>-<branch>.getctrl.dev. - The parent's size, port, region and env vars.
- No volume. A preview never mounts the parent's volume, so it can't touch production's files.
- One copy. Previews never run in high availability.
Previews get the parent's env vars, database credentials included. A managed database is reachable only from the parent's node. A preview placed on the same node reads and writes production's database; on any other node, it can't connect to it. Keep that in mind before pushing a branch that changes your schema or writes data.
Previews show up in your default project's production environment, named after the repo and branch.
Limits#
- At most 5 previews at once per account. Deleted ones don't count. Past that, a new branch gets no preview, and nothing tells you so yet. Delete a branch to free a slot.
- Previews count against your blocks like any app. If your apps' real use is already at your blocks, the preview isn't deployed, again without a notice.
- No blocks, no previews. An account with no blocks, or a canceled subscription, gets no previews.
When a preview goes away#
A preview is deleted when either of these happens:
- You delete its branch on GitHub.
- A pull request from that branch is closed or merged. A pull request from a fork doesn't delete a preview of a branch with the same name in your repo.
You can also delete a preview from its app page, like any app.