Getting Started


There are two main ways to install Deployer: using the PHP archive (phar) or composer. The documentation provides extensive installation instructions. For simplicity we'll install the phar.

$ curl -LO
$ mv deployer.phar /usr/local/bin/dep
$ chmod +x /usr/local/bin/dep


The flow is the order in which tasks are executed. The common flow follows the order of:

task('deploy', [

In short each stage is an atomic deployment task where typically if one fails the build will not be deployed.

  • deploy:prepare - ensures directory structure for deployment exists (ie. releases folder)
  • deploy:lock - so that there can only be one concurrent deployment
  • deploy:release - creates a new release folder
  • deploy:update-code - pulls code from your Git repository
  • deploy:shared - pesists files between releases (ie. user uploaded files)
  • deploy:writable - sets file permissions (modes: chown, chgrp, chmod or acl)
  • deploy:vendors - install composer dependencies
  • deploy:clear-paths
  • deploy:symlink - swaps the 'current' deployment for this release
  • deploy:unlock - removes lock file and you can trigger another release
  • cleanup - can remove old unwanted releases
  • success - display a success message

A Sulu example deployer configuration was posted in an issue by Alexander Schranz which for reference I have Gisted below.


* Deployer Documentation