Projects, environments and services
A project holds environments, each environment holds services, and a service is the thing you deploy and pay for.
All pages
A project is one app and the parts it needs, such as a website, an API and a database. Creating a project also creates its production environment, which deploys from main unless you pick another branch.
An environment is one copy of the project's services. Every service in the project has a place in each environment, with its own settings, access and variables there.
| Environment | Deploys from | Sleeps |
|---|---|---|
| Production | the branch the project tracks | never |
Any other, such as staging | its own branch | after 15 minutes without a request |
A new environment gets its own copy of every database and cache, and each copy starts empty: environments never share data. Branch environments shows how to make one, and sleep explains why the others rest.
A service is one running program. It runs in one site in an environment: you choose the site when you create it, and it can't change. There are three kinds:
| Kind | Added from | What it is |
|---|---|---|
| Web service | GitHub repository | Your code, such as a website or an API, answering HTTP on its port. Ghaym builds it from your repository. |
| Database | PostgreSQL or MySQL | A database Ghaym runs for you inside the project. |
| Cache | Redis | A cache Ghaym runs for you inside the project. |
Web services deploy from a Git repository, and databases and caches live inside the project's own network. A web service answers at an address ending in ghaym.app, and your own domain can point to it too.
A service's size sets its memory, its CPU and its monthly price, and the console shows that price before you pick a size. A web service can run as several replicas. A database or a cache scales by readers instead, and its size changes only to one with the same disk. Each environment has its own size. Scaling shows both, and billing shows how the price adds up.
List your projects, then one project's environments, with the CLI:
ghaym cloud projects list
ghaym cloud environments list shopenvironments create makes an environment that deploys from its own branch, and services metrics shows one service's CPU, memory and requests.