Skip to main content
A preview environment is a temporary, fully isolated copy of an existing environment. It runs the same services with their own URLs and their own network namespace, on top of its own copy of the parent’s stateful data, so a change can be tested end to end without touching the parent.

How previews are created

  • Per pull request - with the GitHub integration connected, Specific creates a preview environment for each open pull request, keeps it up to date as new commits are pushed, and posts its URL back on the PR. Connect GitHub from the dashboard.
  • Manually - deploy one on demand with specific deploy --preview.
Preview environments are ephemeral: pull-request previews are removed when the PR is closed or merged, and a preview can be given an expiry, after which Specific cleans it up automatically. Run specific status to list every environment and its env_... ID, including preview environments. Target a preview with --environment on commands that take one.

What’s copied from the parent

A preview branches off a parent environment and starts from its data. Each resource is forked in the way that’s fastest for that service:
  • Postgres databases are branched - an instant, copy-on-write branch.
  • Object storage buckets are forked.
  • Volumes are cloned - an instant, copy-on-write copy of the parent volume.
The preview gets its own isolated database, buckets, and volumes; writing to them never affects the parent. A volume clone is an exact replica of the parent’s on-disk data (uploads, caches, and search indexes alike), so the preview’s service boots on it exactly as it would after a restart, with no extra configuration.

Observability

Previews stream logs and metrics exactly like long-lived environments. Query them by targeting the preview with --environment:
specific query --environment preview-a1b2c3d4 \
  "SELECT Timestamp, Body FROM observability.logs ORDER BY Timestamp DESC LIMIT 50"
See Observability for the full query reference.