- 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.
The steps can be done by a human or a Continuous Deployment (CD) system. The commands can be executed using drush site aliases.
- Allocate time required for the deployment.
- Get a backup of the database, code, and public files (a full backup). // ToDo: Add the Drush command for that
drush @mysite.myenv ssh// ssh on the server for the specific websitedrush cset readonlymode.settings enabled 1 -y(Enable readonlymode module related configuration)drush cset system.maintenance_mode TRUE(Enable maintenance mode)git pull(orgit checkout mytag1if using tags)drush updb(so we disable any modules through hook_update_N that will not come from composer)composer installdrush updbdrush cimdrush crdrush cset system.maintenance_mode FALSE(Disable maintenance mode)drush cset readonlymode.settings enabled 0 -y(Disable readonlymode settings)
Modules used on the process above: