Craft CMS setup at fortrabbit
Published
Updated
Create an app at fortrabbit for a Craft CMS project. The Craft CMS software template sets the root path, the ENV vars and the deployment commands.
Install and deploy run down
- Install Craft CMS locally
- Setup an app at fortrabbit ← you are here
- Deploy code via Git
- Database syncing
- Assets syncing
Install the fortrabbit GitHub App (recommended)
Git deployment needs the fortrabbit GitHub App on the GitHub account. Check it in the account settings:
Skip this step for an upload with SFTP or rsync.
Create an app at fortrabbit
Create a new app in the dashboard, the wizard guides through the steps:
With the GitHub App installed, connect the repository now: fortrabbit detects Craft CMS from it. Without a repository, choose Craft CMS from the software list.
Configuration
Choosing Craft CMS applies its software template. It sets the root path to web, the ENV vars, the build commands and the post-deploy commands:
Craft CMS 5, 4, 3
| Deployment | Value |
|---|---|
| Root path | web |
| Deploy strategy | merge |
| Replaced paths | /config/project |
| Excluded paths | /node_modules |
| Build commands | composer install --no-dev --prefer-dist --no-interaction --no-ansi --no-progress |
| Post-deploy commands | php craft migrate/allphp craft project-config/applyphp craft clear-caches/all |
| Environment variables | Value |
|---|---|
| CRAFT_ENVIRONMENT | ${FORTRABBIT_ENVIRONMENT_NAME} |
| CRAFT_DEV_MODE | false |
| CRAFT_ALLOW_ADMIN_CHANGES | false |
| CRAFT_ALLOW_UPDATES | false |
| CRAFT_SECURITY_KEY | !RANDOM_KEY! |
| PRIMARY_SITE_URL | https://${FORTRABBIT_MAIN_DOMAIN} |
| CRAFT_STREAM_LOG | true |
| Database environment variables | Value |
|---|---|
| CRAFT_DB_SERVER | ${FORTRABBIT_DB_HOST} |
| CRAFT_DB_DRIVER | mysql |
| CRAFT_DB_DSN | mysql:host=${FORTRABBIT_DB_HOST};port=3306;dbname=${FORTRABBIT_DB_NAME} |
| CRAFT_DB_PASSWORD | ${FORTRABBIT_DB_PASSWORD} |
| CRAFT_DB_USER | ${FORTRABBIT_DB_USER} |