Environments¶
PaaS supports two kinds of environments:
1. Production (default)¶
The main branch deploys to <app>.runtime.di2amp.com. This is your production environment.
2. Preview environments¶
Push to any non-main branch to get an isolated preview env:
PaaS creates:
- A new K8s Deployment with the same Procfile + paas.toml
- A copy of the production add-ons (PostgreSQL fork via PITR)
- A unique URL:
https://feature-new-ui.<app>.runtime.di2amp.com - A unique TLS cert via cert-manager
Preview env config inherits from production by default. Override per-branch in paas.toml:
Lifecycle¶
Preview envs are deleted 7 days after the source branch is deleted (or merged + branch removed).
To delete manually:
Promote preview → production¶
Or via the dashboard: Apps → <name> → Previews → Promote.
Variable Hierarchy¶
graph TD
A[Platform defaults] --> B[App config vars]
B --> C[Secrets]
C --> D[Runtime env]
D --> E[Your app process]