Comparing per-pull-request environments on Vercel, Render, Railway, Heroku, Qovery, Northflank and a do-it-yourself GitHub Actions and Kubernetes setup, plus Encore's per-pull-request backend environments.
A preview environment is a temporary deployment of a pull request, with its own URL, that reviewers and tests use before merging. Frontend previews are close to free in 2026, while a backend preview needs its own database, queues and secrets, which is where platforms differ.
This guide compares seven ways to get preview environments by what each recreates per pull request and where it runs. It also includes Encore, which builds previews from infrastructure declared in code.
What you need to decide:
Vercel creates a preview deployment for every push to a branch, with a unique URL and comments on the pull request, and needs no configuration for Next.js and most frontend frameworks. Serverless functions deploy with the preview. Databases come through marketplace integrations, some of which create a branch per preview, and long-running backends, queues and workers sit outside Vercel's model.
Render preview environments copy every service and database defined in a Blueprint for each pull request. Enabling them is one block in render.yaml:
previews:
generation: automatic
expireAfterDays: 3
services:
- type: web
name: api
runtime: node
buildCommand: npm ci && npm run build
startCommand: npm start
envVars:
- key: DATABASE_URL
fromDatabase:
name: orders-db
property: connectionString
databases:
- name: orders-db
Previews use the same instance types as the Blueprint unless you override them, so a large production database is copied as a large preview database. Everything runs in Render's cloud.
Railway PR environments clone a project environment for each pull request, including its services and databases, and delete it on merge or close. Setup is a toggle in project settings, and variables can reference the preview's own database. It fits apps already on Railway and runs in Railway's cloud.

Review apps are part of Heroku Pipelines and build an app per pull request from app.json, which lists add-ons, environment variables and a postdeploy script for seeding. They are mature and simple. Heroku moved to a sustaining engineering model in February 2026, so few teams start new projects on it, and review apps are mostly relevant to existing Heroku pipelines.
QoveryQovery deploys to Kubernetes clusters in your own AWS, GCP or Azure account and can clone an environment for each pull request, including managed or container databases. You keep the cloud account, and Qovery operates the cluster. It suits teams that want previews on their own infrastructure without writing the pipeline.
NorthflankNorthflank preview environments are built from templates that describe services, jobs and addons such as Postgres and Redis, triggered by pull requests. They run on Northflank's cloud or on clusters in your own account. Templates are flexible, and someone has to write and maintain them.
Encore builds previews from the infrastructure declared in backend code, so a database or Pub/Sub topic in the app appears in each preview without a separate config file:
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("orders", { migrations: "./migrations" });
With the GitHub repository connected, each pull request gets a preview environment in Encore's hosting, such as pr:72, with migrations applied or a Neon branch of another environment's database. Cron jobs do not run in previews, so scheduled work is triggered by calling its endpoint. Previews run in Encore's hosting rather than your cloud account, while environments such as production can run in your AWS or GCP account. It only applies to apps built with Encore.
The do-it-yourself version deploys each pull request into its own Kubernetes namespace with Helm, triggered by the pull_request event:
name: preview
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
deploy:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy preview
run: |
helm upgrade --install pr-${{ github.event.number }} ./chart \
--namespace pr-${{ github.event.number }} --create-namespace \
--set image.tag=${{ github.sha }} \
--set ingress.host=pr-${{ github.event.number }}.preview.example.com
teardown:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Delete preview
run: kubectl delete namespace pr-${{ github.event.number }}
The workflow omits the hard parts: cluster credentials, image builds, wildcard DNS and certificates, a database per namespace and secrets for each preview. It gives full control and matches production closely when production is also Kubernetes, but it is a platform project to build and keep running.
Most platforms start a preview database empty and run migrations, which keeps previews fast and free of production data. Seed data then comes from a migration, a seed script or a fixture endpoint. Copying production data into previews needs masking for personal data, and branching databases make copies cheap without making them safe to share.
A preview environment is a temporary copy of your application created for a pull request, with its own URL, so reviewers and tests can use the change before it is merged. It is deleted when the pull request closes.
For frontends, Vercel and similar hosts give previews with almost no setup. For full backends with databases and queues, the choice is between platforms that recreate the whole stack per pull request, such as Render, Railway, Qovery, Northflank and Encore, and a do-it-yourself setup on Kubernetes.
With Encore, declare the database in code with new SQLDatabase("orders", { migrations: "./migrations" }) and connect the GitHub repository to your Encore app. Each pull request then gets a preview environment named after it, such as pr:72, with its own database and migrations applied, and it is destroyed when the pull request is merged or closed.
Sharing one staging database between previews means one pull request's migration or test data can break another's. A database per preview, created from migrations and optionally seeded, keeps each review isolated at the cost of a little more compute.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.