Skip to content

Latest commit

 

History

History
135 lines (86 loc) · 3.98 KB

File metadata and controls

135 lines (86 loc) · 3.98 KB

Drupal Deployment

The Drupal documentation describes the deployment and initialization process of a TYPO3 CMS application.

The deployment package is inspired by deployer-extended-typo3.

The deployment workflow uses the deployer package deployer-extended as basis.

Installation

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.

Tasks

The following tasks are Drupal specific and extend the default deployer deployment:

Default 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();

Clear the cache

This task calls drush cache-rebuild.

dep deploy:cache:clear

Import the drupal configuration

This task calls drush cim.

dep deploy:configuration:import

Update the database

This task calls drush updb.

dep deploy:database:update

Sync the database from another drupal instance

This 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-main

Backup the database

Uses 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:backup

Sync the files from another drupal instance

This 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-main

Create a logs directory in private

This task creates a logs directory in the private folder. Can be used e.g. for monolog logging.

dep deploy:log_dir:create

Enable/disable the maintenance mode

This task uses drush to enable/disable the maintenance mode.

dep deploy:maintenance:enable
dep deploy:maintenance:disable

Permission handling

Sets reasonable permissions for the project directory and the files folder.

dep deploy:permissions:drupal
dep deploy:permissions:drupal_files

Update the drupal translations

This task calls drush locale:update.

dep deploy:translations:update