Docs menu
Environments
An environment is one running copy of an application, with its own branch, configuration, processes, and URL.
On this page
An environment is one running copy of an application, with its own tracked branch, configuration, processes, and URL. Every deploy, scale change, and rollback happens inside one environment.
The production environment#
Every application starts with an environment named Production (slug production). It tracks the branch you picked when you created the application, answers at <app-slug>-production.primcloud.app, and runs the process types from your Procfile.
Push to the tracked branch and Production deploys. To track a different branch, change it in the application's settings.
What's set per environment#
| Setting | Set on |
|---|---|
| Repository | Application |
| Region | Application |
| Branch | Environment |
| Secrets | Environment |
| Formations | Environment |
| Compute size (per formation) | Environment |
| Custom domains | Environment |
| Deployment history | Environment |
Two environments of one application can track different branches, hold different secrets, run formations at different sizes and Instances, and answer to different hostnames, independently of each other.
Environment statuses#
- Active: your app runs and serves traffic.
- Maintenance: visitors see a maintenance page instead of your app, which keeps running. Turn maintenance mode on and off from the application's settings.
- Suspended: visitors see a suspended page instead of your app. We set this for abuse or policy violations.
These are separate from your account's billing state. An account suspended for an unpaid invoice stops every environment it owns, and its visitors see the suspended page even where an environment is in Maintenance. See Past-due & Suspension.
More environments per application#
On Standard, an application has one environment, Production. On Pro and Team, it can have more, such as staging, plus a preview environment for each pull request that's removed when the pull request merges. Each environment is configured on its own.
Deleting an environment#
Deleting an environment removes its processes, domains, secrets, and deployment history, and leaves the application untouched. Production can't be deleted on its own; delete the application instead.