The Drupal documentation describes the deployment and initialization process of a TYPO3 CMS application.
The deployment package is inspired by deployer-extended-typo3.
- Installation
- Tasks
- Clear the cache
- Import the drupal configuration
- Update the database
- Sync the database from another drupal instance
- Backup the database
- Sync the files from another drupal instance
- Create a logs directory in private
- Enable/disable the maintenance mode
- Permission handling
- Update the drupal translations
The deployment workflow uses the deployer package deployer-extended as basis.
The default configuration for Drupal applications is located at set.php and can be overwritten optionally.
If you want to use the Drupal deployment functionalities add the belonging autoloader to your project deploy.php:
require_once(__DIR__ . '/vendor/xima/xima-deployer-tools/deployer/drupal/autoload.php');See an example configuration here: drupal example.
The following tasks are Drupal specific and extend the default deployer deployment:
The default deployment task for Drupal applications can be found here deploy.php.
Note: Keep in mind that you can disable any of the tasks in the default deployment and customize it to your needs:
task('some-task')->disable();This task calls drush cache-rebuild.
dep deploy:cache:clearThis task calls drush cim.
dep deploy:configuration:importThis task calls drush updb.
dep deploy:database:updateThis task needs to have the deployer argument sync in place. Pass in a drush site alias as you normally would when executing drush:sync. The drupal instance referenced by this alias acts as the sync source.
Typically this task is used in the feature branch deployment workflow.
dep deploy:database:sync --sync=mysite.stage-mainUses drush's backup functionality. Typically this task is used in the production deployment. Also cleans up the drush backups keeping a maximum of 10 backups.
The backups are created in ~/drush-backups of the deploying user.
dep deploy:database:backupThis task needs to have the deployer argument sync in place. Pass in a drush site alias as you normally would when executing drush:sync. The drupal instance referenced by this alias acts as the sync source.
Typically this task is used in the feature branch deployment workflow.
dep deploy:files:sync --sync=mysite.stage-mainThis task creates a logs directory in the private folder. Can be used e.g. for monolog logging.
dep deploy:log_dir:createThis task uses drush to enable/disable the maintenance mode.
dep deploy:maintenance:enable
dep deploy:maintenance:disableSets reasonable permissions for the project directory and the files folder.
dep deploy:permissions:drupal
dep deploy:permissions:drupal_filesThis task calls drush locale:update.
dep deploy:translations:update