Groundfloor Docs

Environments

Keep dev, staging and prod apart, give each its own Shell site, then compare and promote secrets, flags, apps and Coderunners between them.

Every workspace has three environments: dev, staging and prod. Secrets, feature flags, Shell apps and Coderunners are kept separately in each, so you can change dev without touching prod, and each environment has its own Shell site (rolling out). When something works, you promote it to the next environment.

What each environment has

Kept per environmentPromote it?
SecretsYes. Values are never shown in the comparison
Feature flagsYes. Values are shown in the comparison
Shell app releasesYes. The target app is created if it doesn't exist, with the same path and the same access
CoderunnersYes. The same version is deployed to the target, creating the Coderunner if needed

Apps and Coderunners run against the environment they belong to, and read that environment's secrets and flags. Promoting an app to prod makes the prod copy use prod's settings, with no code changes.

All environments share the workspace's data: collections and their records, files, who can use them, and managed databases. Promoting never copies data. A Coderunner's persistent disk is the exception to sharing: each environment's copy has its own disk.

A Shell site for each environment

Rolling out

Shell sites for each environment are being switched on region by region. Until they're on for yours, the apps of every environment share your workspace's one Shell site, and the Shell sites card below doesn't appear.

Each environment's Shell site shows only that environment's apps:

EnvironmentShell site
prodhttps://<workspace-slug>.app.groundfloor.cloud, and your own domain if you've set one
staginghttps://<workspace-slug>.staging.app.groundfloor.cloud
devhttps://<workspace-slug>.dev.app.groundfloor.cloud

If your workspace uses its own subdomain, that replaces <workspace-slug>. An app keeps its path, /apps/<app-slug>, in every environment, so the prod copy of crm opens at https://<workspace-slug>.app.groundfloor.cloud/apps/crm. If another app in the target already uses that path, the copy gets its own; the app's page shows it as Shell path.

Sites other than prod show a small badge with the environment's name, and ask search engines not to index them. A workspace with no prod environment keeps one Shell site for all its apps.

When it's switched on

  • Apps that are only in dev move to the dev site. Most apps are in dev today, so they open at https://<workspace-slug>.dev.app.groundfloor.cloud, and your usual address shows only apps in prod. Promote to prod every app your users should see at the usual address.
  • Backends that allow your Shell site for CORS must also allow the dev and staging site addresses for apps there. See Allow calls from your Shell site.
  • With External sign-in, register each site with your provider as a redirect address, for example https://<workspace-slug>.dev.app.groundfloor.cloud/*. With Groundfloor sign-in this is done for you.

Choose who can open each site

Go to Build → Environments and pick the workspace. The Shell sites card lists each environment's address; the workspace's page lists them too, under its environments. Click Site next to an environment, choose who can open its site, and save:

OptionWho can open the site
Same people as prod (default)Whoever can open the prod site. On prod itself this is Workspace default: no rule beyond each app's own
Only these rolesSigned-in users holding one of the roles you pick
Anyone, no sign-inEveryone. Only while the workspace's sign-in mode is None; if you turn sign-in on, the site follows prod again

This applies on top of each app's own Who can open an app setting. Site label sets the name in the address: staging gives <workspace-slug>.staging.app.groundfloor.cloud, and prod is the usual address. Renaming an environment doesn't change its label. Only dev, staging and prod get a Shell site; leave the label empty, or use another one, and the environment has none.

You need the Admin or Owner role in the workspace or its organization to change site settings.

Compare and promote

Open Environments

Go to Build → Environments and pick the workspace.

Choose the two environments

Pick the source and the target, for example staging → prod.

Review each area

Open the Secrets, Feature flags, Apps and Coderunners panels, and review what will change. Where a key already exists in the target, choose whether to skip it or overwrite it.

Promote

Promote each area you reviewed. Coderunners and apps may take a few minutes to build and deploy in the target.

From the CLI, flags have their own commands: gf flags compare dev prod, then gf flags promote dev prod.

Good to know

  • The first promotion of an app gives its copy the same access: a Restricted app stays restricted, for the same roles. Promoting again never changes the copy's access. If the copy is open to more people than the original, for example it's open to the whole workspace or grants a role the original doesn't, the Apps panel says so; review who can open it.
  • A Coderunner belongs to one environment and can't move to another: to run it in another environment, promote it there or create a Coderunner there. A Coderunner that shows No environment doesn't appear in the promote panel and its code gets no environment ID. A Writer, Admin or Owner can bind it once with Bind to environment on its page or gf coderunner bind-environment; binding is permanent, and nothing changes for the running service until its next deploy. See Bind a Coderunner to an environment.
  • Promoting a Coderunner doesn't carry its deploy-time environment variables. See Configuration and secrets.
  • Promoting a Coderunner with a persistent disk gives a newly created copy its own, empty disk of the same size. The data on the disk is never copied, and the new disk counts toward your storage limit.
  • You need the Writer, Admin or Owner role to promote.
  • With a Shell site for each environment (rolling out), apps that aren't in any environment open on the prod site. If a prod app already uses the same path, the prod app wins, and the other app opens at its own slug, or nowhere if that's taken too.
  • Apps in an environment with no Shell site, because it's suspended, has no site label or uses a label other than dev, staging or prod (such as qa), appear on no site. Sign-in emails for them link to the Shell site's home page instead of the app.
  • An environment whose site is limited to Only these roles can't be deleted while it has apps, and a prod environment limited that way can't lose its prod label while apps follow it. Choose Same people as prod first, or archive or move the apps.

Next steps

On this page