Environments
An environment is one complete instance of your application: its own resources, its own variables, its own hostnames, deploying its own branch. Every project has a Production environment, and the dashboard's environment selector, in the project's navigation bar, switches between all of them.
| Type | How it starts | How it ends | Deploys |
|---|---|---|---|
| Production | With the project. | With the project. It cannot be deleted on its own. | The production branch. |
| Preview | Automatically, when a pull request opens. Named PR #42. | Automatically, when the pull request closes. | The pull request's branch. |
| Named | By you, from an existing environment, for staging, QA or anything long-lived. | By you. | A branch you choose. |
Each is described on its own page: preview environments, named environments, and deleting an environment.
What every environment has
Whatever its type, an environment gets the full project view:
- Overview draws its resources and the connections between them, and says in one line which of the project's components it deliberately does not have.
- Activity lists its deployments and events.
- Variables holds the environment variables every service in it inherits.
- Settings for what can be changed after creation.
A resource page opened from an environment stays in that environment's scope, so its siblings and its parent link are the right ones.
Components and instances
A project is made of components: the web service, the database database. An environment decides, for each component, what it has:
| Decision | The environment gets |
|---|---|
| Create new | Its own instance of the component, empty. |
| Share | Another environment's instance, used in place. No new infrastructure. |
| Clone | Its own instance, seeded from a copy of another environment's data. |
| Don't include | Nothing. The component is deliberately absent. |
The decision is recorded even for Don't include, so an environment created without a worker stays distinguishable from one created before the worker existed. Which decisions are available depends on the component: a web service is always its own or absent, a database can be any of the four. The full table of options, with what each costs, is on named environments.
Isolation
Environments are isolated by default. A service references only resources beside it in the same environment, a variable set in one environment does not exist in another, and a preview never receives a database.
Sharing is the one decision that crosses the line. A shared database appears in both environments, marked Shared from its owner wherever it is drawn, and its page says in amber that writes from here change the owner's data. Kuppit does not copy or isolate it. If that is not what you want, clone instead.
Branches
Production deploys the project's production branch. A preview deploys its pull request's branch and is updated on every push to it. A named environment deploys the branch you gave it when you created it, on every push.
Environments do not promote into each other: there is no button that turns staging into production. Merging the branch is the promotion.