Deploy
Services
A service is your code, built into an image and run in an environment. It comes from a GitHub branch or from a folder you upload.
Kinds of service
| Kind | Runs | Has a URL |
|---|---|---|
| Web service | Your app, listening on a port | Yes, https://<name>.pherwerz.app |
| Static site | Files served as they are | Yes |
| Cron job | A command on a schedule, to the end | No. See Cron jobs |
From GitHub
Connect a repository through the pherwerz GitHub App. The service builds from its environment's branch, and each push to that branch deploys again. A service can keep a branch of its own: change it on the service's page and it stays there when the environment's branch changes.
From an upload
terminal
npx @pherwerz/cloud deploy service ./web --environment <id> --name webA folder is packed without what .gitignore leaves out; a .zip, .tar.gz,
.tgz or a single .html file goes as it is. Pass --service <id> (or set
PHZ_SERVICE) to deploy to a service that exists, and --detach to skip
waiting for the build.