Every pull request now gets its own copy of the app. Deplo builds the branch next to production, gives it a URL of its own and removes it when the branch is merged or closed.
What a preview is
A preview is a full deploy of the branch, with its own container, its own environment variables and its own logs. It runs on the same server as the app it comes from, so what you click is what you will ship.
- The URL shows up on the app page as soon as the build is green.
- A new commit on the branch redeploys the same preview.
- Closing the pull request stops the container and frees the resources.
Turning it on
Previews are off by default. Open the app, go to Settings, then Previews, and pick the branches that should get one.
Variables that only exist in previews
A preview should not write to the production database. Variables marked as preview only replace the production ones inside every preview:
DATABASE_URL=postgres://preview:secret@db-preview:5432/app
STRIPE_KEY=sk_test_replace_meApproving previews from forks
A pull request from a fork could run code you have never read. Deplo waits for someone on the team to approve it before the first build.
Cleaning up
The dashboard lists every running preview with the pull request it belongs to, and any of them can be stopped from there. Read more in the documentation.


