Deploy from GitHub
Connect a repository once. Every push to its branch then builds and goes live with no downtime, and you can roll back from the console.
Connect a repository
- Open your service, then Deployment Center.
- Install the Cloudphere GitHub App on your account or organisation and give it access to the repository.
- Pick the repository and branch. The first deploy starts straight away.
Each push to that branch deploys automatically. GitHub shows the result as a check on the commit.
What Cloudphere builds
- PHP and Laravel
- Detected from composer.json.
- Node.js
- Next.js, Nuxt, NestJS, Express, Vite, React and Vue, detected from package.json.
- Python
- Django, FastAPI and Flask, detected from requirements.txt or pyproject.toml.
- Anything else
- Add a
Dockerfileto the repository. If one exists, it is always used.
For a monorepo, set the service's root directory to the folder that holds the app. npm, pnpm and Yarn workspaces and Turborepo are supported. Variables that start with NEXT_PUBLIC_, VITE_, REACT_APP_, NUXT_PUBLIC_, PUBLIC_ or EXPO_PUBLIC_ are passed into the build.
How a deploy goes live
- The new version is built while the current one keeps serving.
- Your pre-deploy command runs, if you set one, for example
php artisan migrate --force. - The new version starts beside the old one and must pass its health check.
- Traffic switches over. The new version must then keep running for 20 seconds without restarting.
If any step fails, the previous version keeps running and the deploy is marked failed with the reason.
Health check path
By default the new version passes if / answers with any status below 500. In Deployment Center you can set your own path, such as /up or /health. It must then answer with a 2xx or 3xx status.
Roll back
The last five releases are kept. On Deployment Center, choose Roll back next to a release to put it live again in seconds, without rebuilding.
Restart and Redeploy on the Overview page report their result on Deployment Center too, so you can see when they finish.
When a deploy fails
- Build failed: open the deploy's log on Deployment Center. It shows the build output.
- Health check failed: the app didn't answer on the health path in time. Check Logs to see whether it started and is accepting web requests.
- Stopped or restarted after going live: the app crashed on start. Logs usually shows why, often a missing variable.