Dev, UAT and other environments
An environment is a copy of your app for testing: Dev, UAT, Staging or a name you choose. Each environment is its own project, with its own servers, database, web address, settings and dashboard. They are shown together, so you can switch between them in one click.
Add environments when you create a project
On the Launch step, under the summary, choose Add an environment. Most fields start on the right choice for a test copy:
- Branch: a branch named like the environment (
develop,uat,staging) if your repository has one, otherwise production's branch. - Size: the smallest size of the same plan. You can also pick the same size as production, or one small server (the cheapest).
- Web address: the environment's name in front of production's, such as
uat.api.acme.com. You can also use a free address. - Who can open it: the same as production. If production is open to everyone, so is the copy. If it is limited to your office and VPN, so is the copy. You can change it.
- Settings: start empty, so the copy never uses production's live keys by accident. If you can see production's values, you can copy them instead. Database and cache settings are always the environment's own, and production's own address is changed to the environment's. Values that came from a secret manager are never copied: the environment gets its own source.
The Launch button then says what it starts: for example, Launch production and UAT. Every environment launches at the same time.
Each environment is a deployed project
Each environment counts as one of your plan's deployed projects. A plan with two projects can run production and one environment. The Launch step shows how many your plan has left, and offers a bigger plan before anything starts, never half-way through.
When one fails
All environments deploy the same code, so a problem in one is usually the problem in all. When one environment is fixed and goes live, the others that stopped on the same step are retried with that fix. If the fix was a change The Deployer committed to production's branch, and your environment uses another branch, the environment's card names the commit to bring across. Retry once you have merged it.
Add one later
On a project's Dashboard, the Environments card (or the environment switcher next to the project's name) has Add an environment. It works the same way, and copies the project's current setup.
Telling them apart
A copy has a coloured band at the top of its pages, its name next to the project's name, and [UAT] (for example) in the browser tab. Deleting, stopping or resizing names the environment, so you never act on production by mistake.
Moving code between environments
Each environment deploys its own branch. To promote a change, merge it into the next branch (develop into uat, uat into main). With push-to-deploy on, that environment redeploys by itself.