pherwerz docs
How it fits together
Five nouns cover all of pherwerz. Each one owns the next.
| Thing | What it is | Owns |
|---|---|---|
| Workspace | Your team, its members and their roles | Projects |
| Project | One product, such as an app and its API | Environments, preview settings |
| Environment | One running copy of the project, on one git branch | Services, databases, backends, cron jobs, variables |
| Service | A web service, static site or cron job | Its builds, deploys, logs and URL |
| Backend | Postgres with auth, storage and functions | Users, tables, buckets, functions, API keys |
Environments run branches
An environment is connected to a repository and a branch. Its services build
from that branch, and a push to it redeploys them. A branch runs in one
environment per repository in a project, so main can't be both prod and
something else.
Most projects have permanent environments made by hand (prod on main,
dev on dev) and previews: copies made for feature branches, stopped
when the branch is merged. See Preview environments.
Services reach databases by name
Inside an environment, services and cron jobs reach the environment's
databases by name, on a private network. Nothing outside the server can reach
a database unless you give it a public endpoint, and from your own computer
you use phz db tunnel.
Stopping an environment
Environment settings → Stop environment stops every container but keeps
data, settings and URLs. Its URLs answer 503 with a page saying it is
stopped. Start brings back the same containers without a rebuild.