CTRLctrl docs

Projects and environments

A project groups the apps that make up one product. Each project has one or more environments, such as production and staging, and each app lives in exactly one environment.

Your default project#

Every account starts with a default project holding a production environment. Anything you deploy without picking an environment goes there.

The default project, and its production environment, can't be deleted.

Projects#

Create a project from ~/projects → + new project. A new project starts with an empty production environment.

  • Limit: up to 10 projects, the default one included.
  • Names: 1 to 40 characters, and you can rename a project at any time.
  • Deleting: a project can be deleted only once it has no apps, so delete its apps first.

Environments#

A project can have up to 5 environments. An environment's name, 1 to 40 characters, also gives it a short slug for app URLs: Staging becomes staging. The name needs at least one letter or number, and two environments in a project can't share a slug.

Starting empty or from a copy#

When you create an environment you can start empty or copy from another environment in the same project. A copy gives every app in the source its own copy, with:

  • the same repo, branch, size and env vars, and a new URL;
  • no database and no volume. The managed database's variables (DATABASE_URL, DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD) are left out;
  • blanked variables wherever a value points at the source. Any other env var whose value names the source's database host, an app's URL or one of its custom domains comes over blank, so the copy can't reach the source's data by mistake. The dialog lists these, and you can tick a key to keep its value in that app's copy only.
  • no custom domains.

You choose whether the copies deploy right away or are saved stopped, ready for you to start later. A stopped copy doesn't count against your blocks until it starts.

The environment shows copying while it works. If an app couldn't be copied, the environment says which, and why.

Deleting an environment#

Type the environment's name to confirm. Its apps are deleted with it.

  • Production can't be deleted while it's the project's only environment.
  • The default project's production can't be deleted at all.
  • If a delete stops partway, the environment shows it, and you can retry.

App URLs#

Each app gets a URL at <app_id>.getctrl.dev. Its app_id comes from your GitHub login, the repo and the branch:

Where the app lives app_id
Default project, production <login>-<repo>-<branch>
Another project's production <login>-<repo>-<branch>, plus -2, -3… if it's taken
Any other environment <login>-<repo>-<branch>-<environment slug>, plus -2, -3… if it's taken

Deploying into an environment#

Choose + new app on an environment's page and the app is deployed there. With the API, pass environment_id to POST /v1/apps. Leave it out and the app goes to your default project's production.

Pushes#

Every app follows a repo and a branch. A push to that branch redeploys every app that follows it, in any environment.

Branch previews only come from apps in your default project's production environment.