🚚
Push a branch, get a release.
PHP hosting with git push deploy
PHP hosting with git push deploy: a push to the connected branch starts a build on fortrabbit, Composer, an npm build when there is one, then an atomic release. A failed build leaves the old version serving.
Built with
Built what
Built how
fortrabbit is managed PHP hosting with git push deploy as the default. The fortrabbit GitHub App connects a repository to an app and a branch to each environment; a push to the branch starts a deployment on fortrabbit, with no GitHub Actions minutes involved. The build runs in a separate deploy service with the same PHP version as the environment: composer install, then an npm build when the project has one, both pre-configured by the software template for Laravel, Craft CMS, Statamic, Kirby, WordPress and others. If a build step fails, the deployment stops and the previous release keeps serving. Post-deploy commands such as migrations and cache clears run on the web runtime afterwards. Storage is persistent: a deploy overwrites code and leaves uploads, sessions and the database untouched, or replaces the whole web space when the project is built for immutable releases. Repositories on GitLab, Bitbucket or Codeberg deploy through their own CI pipelines over SSH deploy keys. Every new app starts with a seven-day trial.
The git push deploy pipeline
1 Local 2 Git provider 3 fortrabbit 4 environment
┌─────┐ ┌────────────┐ ┌──────────────┐ ┌──────────────┐
│ Git ├───▶ Git repo ├───▶ Deployment ├───▶ web space │
└─────┘ └────────────┘ └──────────────┘ └──────────────┘
The deploy service is its own container, so a heavy npm run build does not take memory from visitors. Dependencies are cached between deploys. Source directory, exclude patterns and build commands are set in the dashboard or in a deploy file in the repository.
Two deployment strategies
- Merge: newer files replace older ones, new files are added, nothing else is touched. The default, and the right one for a CMS whose editors upload files.
- Replace: the web space is wiped and rebuilt from the deploy package, except for the paths in the exclude patterns. Immutable releases for twelve-factor style apps.
Git syncs up only
Code goes up through Git. Content comes down through SSH and SFTP. A file uploaded over SFTP never shows up in the repository, which keeps the repository free of binaries and runtime data. The deployment intro draws the full picture, including what the storage holds after a deploy. The GitHub integration page covers installing the app and connecting a repository.
