Skip to content

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:

git push paas feature/new-ui

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:

[environments.preview]
DEBUG = "true"
LOG_LEVEL = "debug"

Lifecycle

Preview envs are deleted 7 days after the source branch is deleted (or merged + branch removed).

To delete manually:

paas previews:rm feature/new-ui

Promote preview → production

git checkout main
git merge feature/new-ui
git push paas main

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]

See also