-
Notifications
You must be signed in to change notification settings - Fork 4
Running
There are two ways to execute drush-deploy from the command line.
-
The primary way is to run the
drush-deploy
command which is provided by the package. Using this you can easily deploy any Drupal project:drush-deploy TARGET=staging
This will by default run the deploy task however you can override this by supplying an explicit list of tasks to run:
drush-deploy deploy:setup targets TARGET=staging
The drush-deploy command does not require any files in the Drupal project to run.
-
Because it is a capistrano plugin it also can be used like any capistrano plugin in a capistrano project. If your Drupal project has a
capfile
withrequire 'drush_deploy'
in it you can run the cap program supplied by capistrano.
cap
does not have a default task so to deploy you must specify it explicitly.cap deploy TARGET=staging
When doing a deploy, drush-deploy will perform the following actions by default.
- Create a new unique directory
releases/<current timestamp>
in the destination directory and upload the site files to it. - Symlink
shared/default/files
toreleases/<current timestamp>/sites/default/files
- Generate
shared/default/settings.php
from thedefault.settings.php
file along with database settings. See Database-Configuration - Backup the current Drupal database as
<db_name>_<previous release timestamp>
- Run any update scripts of updated Drupal modules (See
update-modules
on Variables)). - Symlink
releases/<current timestamp>
to current, making it the live version of the site