Setup
visionmedia edited this page Jun 8, 2011
·
4 revisions
First up we need to create ./deploy.conf for our staging environment [stage]
. The post-deploy
hook command is executed relative to $path/current/
, so it's safe to add to our repository. This is typically the most important hook, needed to perform tasks such as [re]starting the server. Generally it is good to have a deployer
user, with the requiretty
sudoers setting disabled.
[stage]
user deployer
host n.n.n.n
repo git@github.com:my/repo.git
path /var/www/staging
post-deploy ./restart
Once we have ./deploy.conf set up in our repo, we can initiate the deployment process, by invoking the setup
command, along with the <env>
, which is the staging environment in the case below.
$ deploy stage setup
This process sets up the following paths relative to the config path
:
- $path/shared
- $path/shared/logs
- $path/shared/pids
- $path/source
Then deploy(1)
moves on and performs the initial clone the repo into $path/source
.