Environment variables for production and previews

Give a variable one value in production and another in pull request previews.

  • Apps

Read as Markdown ↗

Every environment variable, at the service or the project level, now has a scope: All, Production or Preview. A value scoped to an environment overrides the All value with the same key, so you can point previews at a staging database or a test API key without touching production.

The Environment variables tab with shared, Production and Preview groups

Existing variables keep working as before: they are scoped to All.

PR previews also got sturdier. A preview that was interrupted halfway is picked up again, and closing a pull request tears down its whole stack cleanly.

← All releases