Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.34 KB

deployment-workflow.md

File metadata and controls

32 lines (25 loc) · 1.34 KB

Deployment workflow for Drupal

Assumptions

  • We are using git for vcs.
  • We are using composer.
  • We are deploying a Drupal 8+ version.
  • There are some tests already passed (on DEV, STAGE environments only). Continue only if tests pass.
  • We have a drush alias for each environment.

Deployment steps

The steps can be done by a human or a Continuous Deployment (CD) system. The commands can be executed using drush site aliases.

  1. Allocate time required for the deployment.
  2. Get a backup of the database, code, and public files (a full backup). // ToDo: Add the Drush command for that
  3. drush @mysite.myenv ssh // ssh on the server for the specific website
  4. drush cset readonlymode.settings enabled 1 -y (Enable readonlymode module related configuration)
  5. drush cset system.maintenance_mode TRUE (Enable maintenance mode)
  6. git pull (or git checkout mytag1 if using tags)
  7. drush updb (so we disable any modules through hook_update_N that will not come from composer)
  8. composer install
  9. drush updb
  10. drush cim
  11. drush cr
  12. drush cset system.maintenance_mode FALSE (Disable maintenance mode)
  13. drush cset readonlymode.settings enabled 0 -y (Disable readonlymode settings)

Modules used on the process above: