Skip to main content
Every deployment target has two environments: Production and Preview. They are isolated instances with separate subdomains and separate databases. Use Preview to deploy and test a change without affecting the live app. Preview has its own database, so a migration or destructive change tested there cannot affect production data.

Deploying to an environment

Choose the environment in the deploy dialog:
  • Preview: deploys the selected version to the Preview instance. The first Preview deploy creates the -preview instance (its own subdomain and database); later deploys reuse it.
  • Production: deploys to the live app.
The two environments hold versions independently. Preview can run a newer version while Production stays on the current release. There is no automatic promotion; Production changes only when you deploy to it.

Environments and deploy targets

Environments exist within each deploy target. An app deployed to more than one target (for example, two regions) has its own Production and Preview instances in each. Each instance is independent.

Custom domains

A custom domain applies to the Production environment only. Preview always uses its default -preview URL.

Deleting an environment

Production and Preview are deleted independently from the target’s settings. Deleting one tears down that instance and its database; the other keeps running. Removing an app means deleting each environment you created.
Deleting an environment permanently removes its database and all associated data. It cannot be undone.