TurboPanel Docs
Using TurboPanel

Projects and environments

A project is one application or stack, described by one compose document. An environment is one deployable copy of it — the thing that actually runs on a server. This chapter is about the container, not the contents: how to create a project, how environments relate to it, where the server is chosen, and how a project is renamed, moved or deleted. What goes inside the compose document is the next chapter, Writing compose; how an environment is deployed and run is Deploying and running an environment.

The model

One project, one compose document, any number of environments.

The Base is the project's compose document, the description every environment starts from. Each environment may carry changes from the Base — a second compose document merged over it, following the Compose Specification merge rules, so a staging environment can change an image tag or add a service without copying the whole file. An environment that has none follows the Base; one that replaces the Base's services outright stands alone. An environment that follows the Base deploys exactly what the Base says, plus whatever it changes.

Think of the Base as the shared defaults and each environment as the changes layered on top, the way a base compose file and an override file work together. Anywhere the app shows a value that comes from the Base, it is marked From the Base.

Every project has one primary environment: the one you land on when you open the project, the one you edit by default, and the one listed first. A project's first environment is its primary. The primary can be changed (see Primary and pinned environments), and it cannot be deleted.

Placement lives on the environment, not in the document. Every environment either pins a server or inherits the project's Default project server. A compose document that tries to name a server is refused at save, because which host runs a workload is the platform's decision and belongs where permissions can gate it.

Three facts follow from this model and explain most of what the app does:

  • Deploy is an environment action. The project page carries no Deploy button; open an environment first.
  • Storage belongs to an environment. A volume is provisioned on that environment's server, so there is no project-level store.
  • Variables cascade. Organization → workspace → project → environment → service → hosting → server, each scope overriding the one before. The compose file carries references, never values.

Finding your way

The sidebar lists Projects, Activity and Servers, then your Recent projects (the last five you opened on this device; a project with one environment opens that environment). Organization settings are behind Settings in the organization menu at the top.

The Projects home

Projects is a card per project. Each card shows:

  • the Base line, for example 3 services · 2 Linux users, and Runs as chips naming the Hosting Accounts the apps run as;
  • a row per environment: its status, whether it Follows the Base (with the number of changes, for example Follows the Base · 2 changes) or Stands alone, and its address.

Above the list, Recent projects and Deploys in progress (also in Activity). The workspace filter, New project and pull to refresh work as before. A managed, platform or not-yet-set-up project gets a plain card with no environment rows. A part the app has no answer for yet is left out, never guessed.

A project

A compose project has three tabs:

TabWhat it holds
EnvironmentsThe Base band (3 services · 2 Linux users, and which environments follow it), then a card per environment: what is running now, the last deploy, a small map (Visitors, Apps, Data), branch, server, address and Open. New environment is here.
BaseThe shared compose, in views for Compose, Services, Hosting, Bindings and Storage. Edit it here and every environment that follows it gets the change on its next deploy.
SettingsProject variables, the workspace, Keep original container names and Danger → Delete project; see Project settings.

An environment

An environment has four tabs under one header. The header is the same on every tab: the environment's name (a picker when there are several), its site link, status, Deploy, Restart (Start when it is stopped) and a ⋯ menu with the previews, cacheless redeploy, Stop, Refresh, environment settings, Destroy and Delete.

TabWhat it holds
OverviewThe map from domains, to apps, to data, a list of services (what each runs as and its status), Changes from Base (n) or {Environment} stands alone, and the three latest deployments. When the newest deploy failed or was rolled back, a notice shows the one line that says why.
DeploymentsThe full deployment history.
ConfigurationWhat this environment runs: the Base plus its own changes. See Configuration.
SettingsThe environment's name, branch and deploy-on-push, and Danger.

Old links keep working: /compose, /services, /bindings, /hosting and /storage open the matching view under Base (project) or Configuration (environment), and /servers opens Hosting.

Before you begin

  • A connected server, or you can create the project but not deploy it. Servers → + Server gives the install command.
  • Manage rights on the organization to create or edit; Owner rights to delete a project; deleting an environment needs Manage.
  • For the Repository choice, a Git source the organization has connected under Projects → Git sources.

Create a project

Projects → New project is a wizard with three steps: details, type, then the type's own step. Nothing is written until you press Create project — leaving the wizard discards it.

Details. A name (unique within the organization, case-insensitive, surrounding whitespace ignored), an optional description, and the workspace it belongs to.

Type. Six cards. Four of them produce the same kind of project — a compose project — and differ only in what the compose draft starts as and which tab you land on. The other two create a project from the catalog.

The type's own step, then Create project. A compose draft, a repository and branch, a hosting kind, a template, or a managed engine — see the table.

CardProject typeWhere you edit it afterwardsChoose it when
ComposecomposeBase → Compose, a blank YAML editorYou already have a compose.yaml, or think in YAML.
ServicescomposeBase → Services, an empty card listYou would rather fill in a form per service than write YAML. The result is the same document.
RepositorycomposeBase → Services, with one service bound to the repositoryThe code lives in a repository the organization has connected. Pick the application, the account, the repository, then the branch. A compose file in the repository, a site, or a Node app all work.
HostingcomposeBase → Services, with one site serviceA directory and an account: a static site, PHP, WordPress. You upload over SFTP and the host engine serves it.
TemplatetemplateBase → Services, filled from the catalog entryA ready-made stack from the catalog. Templates carry their own variables; secret ones are generated for you.
ManagedmanagedThe managed Overview — topology, not composeA database cluster TurboPanel provisions, backs up and connects for you. Pick an engine, a version series and a base-OS variant; the root password is shown once.

A project created without a type (an older app, or an interrupted wizard) opens on a Setup page that offers the same choices and can be resumed later; Finish setup completes it.

Compose, Services, Repository and Hosting are one type

The stored project type for all four is docker-compose. Switch between the Compose and Services views at any time — they are two views of the same document, and an unsaved draft survives the switch.

Environments

The first environment

A project's first environment is its primary one. It is created with the organization's Primary environment name — production unless an owner changed it under Projects → Settings. Changing the setting names the primary environment of projects created afterwards; existing projects keep theirs as it is. A project with a single environment opens that environment directly from Recent projects; the environment picker in the header appears as soon as there is a second one. The project's Environments tab is always there and, with one environment, says so and offers New environment.

Add, rename, delete

Add. On the project's Environments tab, New environment opens a sheet. Give it a Name (see Environment names), then choose Start from: a copy of the primary environment (the default), which begins with the primary's services and settings and still follows the Base; or Empty, stands alone, which ignores the Base and starts with nothing, so you write its compose yourself. Choose its Server: Use the project's server, or Choose a server later when the project has none yet, or pick one. The sheet previews What it will run. Create environment writes it. Nothing deploys until you press Deploy. When the copy is made, the app lists what was left out (see What a copy leaves out).

Rename. Open the environment's Settings tab and edit the name. Once the environment has folders on a server the name is locked (see Environment names).

Delete. Settings → Danger → Delete Environment, or Delete Environment… in the ⋯ menu, opens the Delete Environment dialog: type the environment's name (it has a Copy button) to confirm. It is disabled while the project has only one environment — delete the project instead. The dialog names the environment and says its services, domains, containers and variables are removed. Stop the environment first: while it has a running container or a deploy in progress the delete is refused (environment_running), and the app says so.

A new environment can copy only the primary, not an arbitrary other environment, because a straight copy would duplicate things that must be unique per environment. To base a new environment on a different one, make that one primary first.

Primary and pinned environments

The primary environment is the one a project opens on, the one status and edits default to, and the one a new environment is copied from. It is shown first in the list. A project has exactly one. To move the marker, open another environment's Settings tab, find Primary environment, and press Make primary; the old primary stops being primary at the same moment, and pressing it on the primary changes nothing. If someone else changes the primary at the same time, nothing is changed and you are asked to try again.

You cannot delete the primary while the project has other environments. Make another one primary first, then delete it. The only way to remove it along with everything else is to delete the project.

An environment other than the primary can also be pinned, with Pin (and Unpin) in the same place in its Settings. Pinned environments are listed right after the primary; the rest follow, oldest first.

What a copy leaves out

A new environment that starts as a copy of the primary takes its services and settings, including its own changes and extra layers, and it still follows the Base like every environment. It does not take anything that has to be unique to one environment:

  • hostnames
  • published host ports (the container's own ports stay, so other containers can still reach them)
  • fixed container names
  • the git branch and auto-deploy (the source is kept, but deploy on push is off until you choose a branch and turn it on)
  • secrets and variables
  • the server pin

If the Base itself provides one of these (a hostname, a published port, a container name, an auto-deploying source), the copy overrides it in its own changes, so the copy never competes with the primary for it. Hostnames, ports and the like must be set for the new environment on purpose. The create response lists exactly what was left out.

Empty, stands alone instead drops the Base's services and begins with nothing.

Environment names

An environment name is also a folder name on the servers where it runs, so it follows the Linux folder rule rather than the looser project-name rule. It uses lowercase letters, digits, hyphens and underscores, starts with a letter or digit, is at most 32 characters, and is not a reserved word such as base, common, home or tmp. Anything else is refused with invalid_environment_name. The same rule applies to the organization's Primary environment name. Names must also be unique within the project.

Once an environment has folders on any server (planned, present or still being removed), it cannot be renamed or deleted, because its folders live under its name. The refusal lists the folders that block it. Remove those first, or keep the name.

Managed projects use a dedicated Environments tab for the same three operations.

Follows the Base, or stands alone

An environment follows the Base unless its own compose replaces the Base's services (services: !override or services: !reset), in which case it stands alone. There is no switch to store: the app reads it from what is saved, and the control plane answers the same way in followsBase. A single-environment project has nothing to follow, so its edits go to the Base.

Every edit names where it goes: an environment, or the Base. Editing in an environment's screens changes only that environment; editing in Base changes every environment that follows it. With one environment and nothing else in the Base, an edit goes to that environment. A value an environment gets from the Base is marked From the Base; the environment can set its own value for it, and Go back to Base removes that value again.

One limit: an environment cannot clear a value the Base gives for the Node version, the package manager or the app folder. It can set a different value, but it cannot leave the field empty or "Not pinned". If you want one of these to be unset, change it in the Base instead.

To see exactly how an environment differs, open Overview (the Changes from Base (n) card) or Configuration (Only changes from Base). To change it, use Configuration; to go back to the Base's value for a line, press Go back to Base there. An environment's own compose may now be a partial layer: it can set only a command on a service the Base already gives an image, as long as the merge with the Base is valid. A service that is new in the environment still needs its own image or build.

The Compose Specification merge rules apply: keyed lists such as ports and volumes append with de-duplication, maps such as environment and labels merge by key, and command, entrypoint and healthcheck.test replace outright. Two YAML tags escape the defaults — !reset deletes a key the Base declared, !override forces a full replacement instead of a merge. Writing compose has the full table. Preview ▾ → Merged compose shows the result before you deploy it.

To write an environment's changes as YAML, open Configuration → Compose. An environment with no changes of its own shows the Base read-only, captioned Using project compose, with Create override (a blank document) and Start from project compose (a copy of the Base to edit). Clear overrides (two presses) returns it to the Base.

Placement: which server an environment runs on

Placement is set in the Hosting view, at either level (Base → Hosting for the project, Configuration → Hosting for an environment). A new environment can also pick its server in the New environment sheet:

At Project scope, Default project server sets the server every environment inherits.

At an environment's scope, the Server control pins that environment. Clearing the pin returns it to the project default.

Until an environment resolves to a connected server, its Deploy button is replaced by No server — set one in Hosting. A project whose services declare deploy.replicas or placement constraints is scheduled across the organization's connected servers by the planner; the pin is the anchor, not a cap — see Deploying.

Any connected server in the organization is a valid target, including a self-hosted control plane's own host: a single-server installation can run the control plane and its projects on the same machine. The trade — site and app containers beside the control plane's database and secrets — is the operator's to accept.

Project settings

The project's Settings tab:

SettingMeaningDefault
Add VariableA project-scoped variable, visible to every environment unless one overrides it. Secret variables are write-only once saved.—
WorkspaceMove the project to another workspace in the same organization.The workspace chosen at creation
Keep original container namesOff renames containers to service ids so a redeploy can roll; on keeps the names Compose would give, at the cost of rolling updates.Off
Danger → Delete projectStops every environment, then deletes the project after a typed confirmation. Owner only.—

Environment scope has its own Add Variable (an environment override) and Danger → Delete Environment.

The organization-wide Primary environment name is under Projects → Settings (the settings entry on the Projects list, not inside a project).

Reference

POST /projects

FieldTypeNotes
namestringRequired. Unique per organization after trimming and lower-casing.
descriptionstringOptional.
workspaceIduuidRequired. Must belong to the organization.
typedocker-compose · template · managedThe app's Compose, Services, Repository and Hosting cards all send docker-compose.
codestringCatalog entry code. Required with template and managed.
options.composecompose documentThe initial project compose for a docker-compose project.
serverIduuidOptional default project server.

Project options

KeyValuesMeaning
options.containerNaminguuid (default) · customThe Keep original container names toggle.
options.defaultServerIduuid or absentThe default project server. Cleared by sending null.
options.composecompose documentThe project compose. Validated on every write.

Environment fields

FieldMeaning
nameUnique within the project; follows the environment name rule.
isPrimarytrue for the project's one primary environment. Set it with POST /environments/{id}/primary (no body; idempotent). Answers 409 primary_environment_conflict if it raced another change.
pinnedtrue lists the environment right after the primary. Set with PATCH /environments/{id}. GET /environments returns the primary, then pinned, then the rest oldest first.
startOn POST /environments: copy (default) copies the primary; empty stands alone. Other value: 400 environment_start_invalid. Sent together with options: 400 environment_start_conflict.
notCopiedIn the POST /environments response: a plain-words list of what a copy left out.
serverIdThe pin. null inherits the project default. PATCH /environments/:id.
options.composeThe overlay, or absent when using project compose.

Edit target

PATCH /projects/{id} with options.compose or options.composeOverlays takes target: base (the project's shared compose) or an environment id of the project. With exactly one environment and nothing in the Base, no target means that environment. With several environments, or content already in the Base, no target is 400 edit_target_required. Any other value is 400 edit_target_invalid. An edit aimed at an environment may carry only compose and composeOverlays; project settings in the same request are 400 edit_target_mixed, so send them separately with target: "base".

Names

Project, environment and workspace names are compared after trimming surrounding whitespace and ignoring case, so Blog and blog collide. Four names are reserved for the platform's own system projects (the ingress and its siblings) and are refused on create and rename.

Errors

CodeStatusWhenWhat to do
project_name_in_use409Another project in the organization already has this name (case-insensitive), or the name is reserved.Pick another name.
workspace_name_in_use409A workspace with this name already exists in the organization.Pick another name.
compose_invalid400The compose document failed validation at save. The response carries issues, one per finding, with the path and a message.Fix the listed paths; the editor shows the same findings inline.
project_has_running_services409Delete refused because an environment is still running.Stop or destroy the environment first; the app's delete flow does this for you.
environment_running409Delete refused because the environment still has a running container or a deploy in progress.Stop the environment, wait for it to stop, then delete it.
managed_runtime_present409Delete refused because the environment (or a project's environment) still hosts a managed database cluster.Destroy the managed cluster from its Overview first; the app's managed delete does this in order.
source_referenced_by_compose409A repository cannot be deleted while a project's compose names it in x-turbopanel.source.Detach the source from the service, then delete the repository.
edit_target_required400A compose edit did not say where it goes and the project has several environments, or its content still lives in the Base.Send target: an environment id, or base.
edit_target_invalid400target is not base and not an environment of this project.Use base or one of the project's environment ids.
edit_target_mixed400A compose edit to an environment also carried project settings.Send the settings in a separate request with target: "base".
environment_start_invalid400start is not copy or empty.Send one of the two, or leave it out.
environment_start_conflict400start and options were both sent.Send only one.
invalid_environment_name400The name breaks the environment name rule.Use lowercase letters, digits, hyphens and underscores, up to 32 characters, not a reserved word.
environment_name_in_use409Another environment of the project has that name.Pick another name.
environment_name_locked409The environment has folders on a server, so it cannot be renamed.Remove the listed folders, or keep the name.
primary_environment_cannot_be_deleted409Delete refused: this is the primary and the project has other environments.Make another environment primary first.
primary_environment_conflict409The primary changed at the same moment, so nothing was changed.Reload and try again.
Invalid request400A body field has the wrong shape (for example a non-uuid workspaceId).Check the field types above.
Edit on GitHub

Last updated on

On this page