~/docs/deploy/previews

Dashboard

Deploy

Preview environments

Push a feature branch and get a full copy of the environment it came from, with its own URLs and databases. Merge it and the copy stops, then goes away a week later.

Updated

2026-12-02

Source

apps/web/docs/deploy/previews.mdx

Turn them on

Project settings → Preview settings. Previews are off by default.

  1. Create previews automatically

    Turn the setting on.

  2. List the branches

    Names and patterns, such as feat/* and fix/*. There is no "every branch" default.

  3. Pick a fallback environment

    Usually dev. Used when pherwerz can't tell which environment a branch came from.

From then on, pushing a matching branch creates a preview named after it: feat/login becomes feat-login.

Branch patterns

Patterns match the whole branch name, in order, and the last match wins.

PatternMatches
feat/*feat/login, not feat/login/v2
feat/**feat/login and feat/login/v2
!feat/experiment-*Excludes those, when listed after feat/*
hotfixExactly that name

What gets copied

A preview copies the environment of the branch it was created from: feat/login branched off dev copies dev.

CopiedNot copied
Every service, with its source, commands, port and sizeCustom domains: each service gets a new URL
Variables, with the overrides from preview settingsDeployment history and logs
Database references, pointed at the copy's own databaseWhat's in databases and buckets, unless you choose starting data
Cron jobs, with their schedule pausedBackups

On GitHub

Each commit gets a check, pherwerz-cloud / <environment>, and each pull request gets one comment, edited in place, listing the preview's services and their URLs. Previews come from branches, not pull requests; a pull request from a fork gets nothing.

Merge, stop, delete

WhenWhat happens
The pull request is mergedThe preview is stopped
7 days laterIt is deleted, with its data
The branch is pushed again firstIt starts again; the delete is cancelled
You press Make permanentIt becomes a permanent environment

Each of these is a project setting. Permanent environments are never stopped or deleted by any of it.