Docs menu
Environments
An environment is one running slice of an application: its own branch, config, running pods, and URL.
On this page
An environment is one running slice of an application. It has its own tracked branch, its own configuration, its own set of running pods, and its own URL. Every deploy targets one environment; scaling, redeploys, and rollbacks all happen inside an environment's boundary.
The production environment#
When you create an application, Primcloud automatically creates a single environment named Production (slug: production). It's the environment that:
- Tracks the branch you picked at application creation.
- Owns the free
<app-slug>-production.primcloud.appsubdomain. - Runs the pod formations your first successful build creates from the
Procfile.
Push to the tracked branch and Production redeploys. Change the tracked branch from the application settings page. It repoints the environment at the new branch without recreating anything.
What's scoped per environment#
Environments own everything about how the app runs. The application owns the repo connection, the region, and the environments beneath it; the environment owns everything below that:
| Concern | Scoped to |
|---|---|
| Repository | Application |
| Region | Application |
| Branch | Environment |
| Secrets | Environment |
| Pod formations | Environment |
| Compute size (per formation) | Environment |
| Custom domains | Environment |
| Deployment history | Environment |
Two environments on the same application can point at different branches, hold different secrets, run different pod counts on different compute sizes, and answer to different hostnames, without touching each other.
Environment statuses#
Every environment has a status that governs whether its pods run and what visitors see. There are three:
- Active: normal operation. Pods run. Traffic reaches the app.
- Maintenance: pods are stopped and visitors get a maintenance placeholder page. Set by Primcloud support for planned work at your request, or by staff when investigating an issue on a specific environment.
- Suspended: pods are stopped and visitors get a suspended placeholder page. Set by staff (abuse, policy). Independent of billing status: a billing suspension is a separate axis at the account level and stops pods across every environment you own. See Past-due & Suspension for that flow.
Note
Billing-driven suspension takes precedence over environment status: if your account is billing-suspended and the environment is in Maintenance, visitors see the suspended page, not the maintenance page.
More environments per application#
On Standard, an application runs one environment, the auto-created Production. On Pro and Team, an application can run more environments alongside it, such as staging, plus a preview environment for each pull request that's removed when it merges. Branches, secrets, formations, and domains are all scoped per environment, so each one is configured on its own.
Deleting an environment#
Deleting an environment tears down its pods, domains, secrets, and deployment history, and leaves the application itself untouched. The Production environment can't be deleted on its own; delete the application instead, since an application always needs a home for its primary subdomain.