Naijacloud
Docs

Projects, environments & services

Four ideas cover the whole platform. Knowing how they nest saves you from modelling the same application twice.

4 min read

Workspace

The outermost container. A workspace owns your projects, your object storage buckets, your registered domains, your team members and your billing.

Workspace-level settings live under Settings. That covers the default region for new resources, your S3 credentials and team membership.

Workspace settings open on Members & roles, beside the General, API keys and Storage keys sections

Project

A project groups the services that make up one application. A storefront with a web front end, an API, a database, a cache and a nightly job is one project with five services, not five projects.

Projects show their services and which region they run in:

A project page showing its services: a web service, a static site, a cron job, a database and a cache

Environment

Every project has environments. A new project starts with dev, and you add uat, prod or others when you need them. Every service exists once per environment. Switching the environment tab switches which copy of the service you are looking at.

Environments are isolated in the ways that matter:

  • Variables are per environment. A value set in prod is not visible in dev. Only variables you explicitly scope to all environments are shared.
  • Deploys are independent. Deploying dev does not touch prod.
  • Databases are separate instances, so you can run a destructive migration in dev without risk.

Environments already isolate configuration and data, so creating a second project for "the staging version" of an app just duplicates work. Use environments instead.

Service

A service is one running thing. There are five kinds:

KindWhat it isBilled on
Web serviceA container serving HTTP trafficInstance type, while running
Static siteBuilt files served from diskBandwidth only
Cron jobA command on a scheduleRun time
DatabaseManaged Postgres, MySQL or RedisInstance type and storage
Object storageAn S3-compatible bucketStored bytes and bandwidth

Web services, static sites and cron jobs are built from a source repository. Databases and buckets are provisioned rather than built, so they have no build configuration.

Regions

Each service picks the region it runs in, so you can keep an application close to the users who need it. You choose the region when you create the service, and it is shown on the service's overview and settings pages.

Services in the same project and region reach each other over the internal network. That is why a database connection string can point at an internal address instead of the public internet. See Connecting to a database.

The regions available to you are listed in the region picker when you create a service. Your workspace's default for new resources is set under Settings.

Next steps