Deploy
Environments
Production and preview, and what each one holds.
Every app has two environments, created with the app:
| Environment | Receives |
|---|---|
| Production | Pushes to the default branch, and the deployments you promote. |
| Preview | Pushes to every other branch, pull requests from forks, and manual deployments you send there. |
Additional environments aren't available yet.
What is set per environment
Each environment has its own:
- Variables, for example a test database in preview
- Custom domains
- Runtime settings: regions, instances, CPU, memory, storage, health check, port and command
- Gateway policies
Source and build settings, such as the repository, root directory and Dockerfile, apply to the whole app.
When a setting differs between environments, the settings page shows both values. A change applies from the next deployment in that environment.
Previews don't run forever
Preview deployments stop when a newer one on the same branch is ready, or after an hour without requests. This keeps forgotten branches from using resources. Use Wake deployment to start a stopped one again. See Deployments.