Skip to main content
Open console

Environments

What production, staging and development are for, and what you can add.

4 min read

An environment is one running copy of your application, with its own machines, database, domain and variables.

The first one is production

Every project's first environment is production. Its machine name cannot be changed. Machines get a .vallic.cloud address built from that name.

Environments cannot be added until the project's initial setup is finished.

The other types

Type For Machine Backups kept Protected
Production The live site What you configured Four days of dailies, or what you bought Always
Staging Checking a release before customers see it Two shares of the shared non-production machine The last three days Yes, until you turn it off
Development One feature branch One share of the same machine The last day No, until you turn it on

A project has one staging environment. A development environment is a branch on its way to staging, so it cannot be added until staging exists. Development environments are named dev- and the branch name.

Every environment is backed up. See Backups.

Protected environments

A protected environment is kept when its branch is deleted. On GitHub, deleting a branch deletes every unprotected staging or development environment built from it: its machines, its hostname and its backups. If your repository deletes head branches automatically, merging a pull request does this. GitLab and Gitea do not do this.

Production is always protected, and that cannot be changed. For staging and development, set Protected when you add the environment, or change it later under Source on the environment, next to the branch and Deploy on push. Turning protection on needs the Developer role. Turning it off needs the Admin role, the same as deleting the environment.

Protection does not change who may do what. Production's own rules decide that: see Teams.

The non-production machine

Every environment beyond production shares one machine, resized like any other.

The environment count costs nothing. Raising it gives every environment less, and lowering it gives them more. Three environments give staging half the machine and each of the others a quarter. Six give staging two sevenths and the others a seventh each. Giving them all more means a bigger machine.

Choose the count and the machine on the configurator when the project is set up. Change both later under Commercial terms on the project's configuration page. Adding an environment past the count opens that dialog. A running environment cannot be un-bought there: delete it first.

The machine is built with the first environment beyond production. If the provider has no room left for it, nothing is built. You are told which provider limit the machine would pass. The environment waits with Build on its page until support has had the limit raised.

Shape

Every environment other than production runs as a single machine, whatever production runs.

What lives on an environment

  • Its source: the branch it tracks, and whether a push deploys it. No two environments in a project track the same branch.
  • Variables, and the ones it inherits from the project. See Variables.
  • Domains and their certificates.
  • Service versions: the database, cache and runtime versions from the catalogue.
  • Disks, and which service each one holds. See Storage.

Domains

Every environment answers on a …vallic.cloud hostname from the moment it exists. That name is always a direct route to the machine, never behind a CDN. Use it to check whether something is broken without a cache in the way.

Adding your own domain is two records, shown on the Routing tab with the values filled in:

  • A CNAME at the environment's own hostname, or at the CDN if the project has one: the tab shows whichever applies. Publishing it proves control on its own.
  • A TXT record proving control. You need it only to be verified before moving traffic, as when migrating a live site in without a gap.

An apex domain cannot hold a CNAME, so there the TXT record is the only proof. The address is given as A records, or as ALIAS/ANAME if your provider has them.

Primary and canonical

One domain per environment is primary, marked on the Routing tab.

Make one of your own domains primary, and the platform hostname redirects there. Your other domains go on serving. Until you do, the platform hostname is not redirected. Make it canonical as well, and every other hostname redirects there, so the site is reachable at one address.

An unverified domain is refused as primary, because redirecting to it would take a working site off the air. See Domains.

Copying data between them

The target's database and files are replaced, not merged.

Backups → Copy from another environment copies a running environment's database and files, as they are right now, into another environment of the same project.

Production can never be the one copied into. Nothing is scrubbed on the way unless you declare it in .vallic/commands/sanitization.yml. Backups has the details.

Next

  • Variables — configuration that differs between environments
  • Domains — putting your own name on one
  • Deployments — what happens when code reaches one