Deployment environments
Understand Preview and Production configuration in Easel.
Deployment environments let the same project use different configuration for testing and production traffic.
Easel provides two deployment environments:
- Preview
- Production
The environment is selected when the deployment is created. It determines which environment variables and environment-specific settings are used during the build and at runtime.
Preview
Preview deployments are for changes that are not yet serving production traffic.
They are commonly created from:
- Non-production branches
- CLI deployments without
--prod
Preview deployments let you test application behavior using Preview configuration without modifying production domains.
A Preview deployment receives a unique deployment URL. Git-connected deployments also update a stable branch preview URL after the deployment reaches Ready, and a pull request preview URL when an open pull request exists for that branch.
Production
Production deployments are for live traffic.
They are commonly created from:
- The configured production branch
easel deploy --prod- The dashboard Deploy action
- Promoting a Preview deployment (rebuilds with Production configuration)
Production deployments use Production environment variables and settings.
A Production deployment may become the current production deployment automatically or stay Staged until you promote it, depending on Auto-assign production domains.
Environment comparison
| Preview | Production | |
|---|---|---|
| Primary purpose | Test changes | Serve live traffic |
| Typical Git source | Feature branch | Production branch |
| Environment variables | Preview | Production |
| Unique deployment URL | Yes | Yes |
| Stable branch or PR URL | Yes | Not for production traffic |
| Can serve production domains | No | Yes, when Current |
Environment variables
Variables can have different values in Preview and Production.
For example:
When a deployment is created, Easel snapshots the resolved variable values for that environment. The build and runtime use that snapshot. Changing variables later does not alter an existing deployment; create a new deployment to pick up updates.
You can also set preview branch overrides in Project settings → Environment Variables for branch-specific Preview values.
Do not place secrets directly in source control. Configure them in Project settings → Environment Variables.
Environment and traffic are separate
A deployment's environment describes its configuration. It does not, by itself, describe whether the deployment currently receives production traffic.
For example, a Production deployment can be:
- Building
- Ready but not Current (Staged)
- Current
- Superseded by a newer Current deployment
- Restored during Instant Rollback
This separation lets Easel finish a production-ready release before changing production routing.
Auto-assign production domains
In Project settings → Environments, turn Auto-assign production domains on or off. It is on by default.
- On: When a Production deployment becomes Ready, Easel assigns the production hostname and live custom domains to it and marks it Current.
- Off: Production builds still complete as Staged. They do not receive production domains until you promote them.
Use auto-assign off when you want to verify a Production build before it goes live. Instant Rollback also turns auto-assign off until you undo the rollback or promote a newer Production deployment. See Rolling back deployments.
Changing the production branch
Configure the production branch in Project settings → Environments.
Changing the production branch affects future Git-triggered deployments only. It does not rewrite or reclassify deployments that already exist.
After changing the production branch:
- New pushes to the selected branch create Production deployments.
- New pushes to other branches create Preview deployments.
- Existing branch URLs and deployment URLs keep their existing identity.
- Auto-assign continues to apply to new Ready Production deployments according to the project setting.