Build commands
composer install; npm run prod
Run Composer and Node.js tasks automatically in a separated deploy service when deploying by git.
# Architecture
Build commands run on an isolated deploy service, which operates independently from the environment runtime.
1 Local 2 Git provider 3 fortrabbit 4 environment ┌─────┐ ┌────────────┐ ┌──────────────┐ ┌──────────────┐ │ Git ├───▶ Git repo ├───▶ Deployment ├───▶ web space │ └─────┘ └────────────┘ └──────────────┘ └──────────────┘raw
# GitHub Actions not required
Software deployment can be complex. Our goal is to support common standards out of the box, while remaining flexible for different workflows. For most common software installations, no configuration is needed here. Our software templates automatically pre-populate standard tasks like composer install based on your selected software and components.
GitHub Actions are not required either, as the fortrabbit GitHub App connects directly to your repositories. Deployments run on fortrabbit, not on GitHub. However, you can also integrate GitHub Actions as an alternative deployment method if you prefer.
# Runtimes and libraries
The deployment service runs in a dedicated, isolated container with the same software versions available as in your environment.
Composer: Installs the latest PHP dependencies as defined in your composer.json, specifically tailored for the hosting environment.
Node.js: Executes npm run prod or similar commands with each deployment to generate JS and CSS assets to be served by your application.
# Automatic deployment cancellation
If the build commands fail for any reason, the deployment will be aborted.
# Post deploy commands
While most deployment-related tasks should run in a separate service, some actions—like migrations and cache busting—need to run on the actual web runtime. That's what post deploy commands are for.