Deploy Craft CMS to fortrabbit
# Install and deploy run down
- Install Craft CMS locally
- Setup an app at fortrabbit
- Deploy code via Git ← you are here
- Database syncing
- Assets syncing
# Git deployment
You are mostly set when you have followed our Craft CMS guides so far. Your local Craft CMS project is connected with a Git repo at GitHub and you have created an app and connected it to your GitHub repo.
You can now trigger a code deployment by issuing git push or clicking the deploy button with the dashboard. This will update the GitHub repo and deploy the latest commit to fortrabbit. See the Git deployment intro on how this works. The fortrabbit platform is not limited to GitHub based deployment. See code access for available options.
# Deployment configuration
Likely nothing to do here. Craft CMS is a pretty standardized application. In most cases the build commands are pre-configured through stack detection (scanning the repo) or software template.
# Deployment strategy
Craft CMS projects are set to blend deployment strategy with replace patterns for all project config YML files in the config folder by default. This is because the Craft asset volumes can be placed anywhere in the file structure.
Consider using the replace strategy with exclude patterns for each asset volume. It works either way.
# Build commands
This setting is most likely pre-configured.
composer install # Always npm run prod # If detectedshell
# Post deploy commands
This setting is most likely pre-configured. In most cases it's useful to run database migrations after deployment to apply changes from project config and migrate all changes.
php craft project-config/apply php craft migrate/allshell