Permalink
Browse files

docs

  • Loading branch information...
1 parent 6121092 commit 0a6160b67b661b0bf83cd4ed374bcbe0d93d65d7 @tj tj committed May 28, 2011
Showing with 61 additions and 4 deletions.
  1. +57 −0 Readme.md
  2. +4 −4 bin/deploy
View
@@ -7,6 +7,63 @@
$ make install
+## Configuration
+
+ By default `deploy(1)` will look for _./deploy.conf_, consisting of one or more environments, `[stage]`, `[production]`, etc, followed by directives.
+
+ [stage]
+ key /path/to/some.pem
+ user deployer
+ host n.n.n.n
+ repo git@github.com:visionmedia/express.git
+ path /home/ec2-user/deploy-test
+ branch origin/master
+ post-deploy /home/ec2-user/deploy-test/update
+
+## Directives
+
+### key (optional)
+
+ Path to identity file used by `ssh -i`.
+
+ key /path/to/some.pem
+
+### user
+
+ User for deployment.
+
+ user deployer
+
+### host
+
+ Server hostname.
+
+ host 50.17.255.50
+
+### repo
+
+ GIT repository to clone.
+
+ repo git@github.com:visionmedia/express.git
+
+### path
+
+ Deployment path.
+
+ path /var/www/myapp.com
+
+### branch
+
+ GIT branch.
+
+ branch origin/master
+
+### post-deploy
+
+ Post-deployment command.
+
+ post-deploy /var/www/myapp.com/restart
+
## License
(The MIT License)
View
@@ -98,7 +98,7 @@ version() {
#
run() {
- local url="`config_get user`@`config_get addr`"
+ local url="`config_get user`@`config_get host`"
local key=`config_get key`
if test -n "$key"; then
local shell="ssh -i $key $url"
@@ -156,10 +156,10 @@ deploy() {
echo \`git rev-parse --short HEAD\` \
>> $path/.deploys"
- # command
- local cmd=`config_get command`
+ # post-deploy
+ local cmd=`config_get post-deploy`
if test -n "$cmd"; then
- log "executing $ $cmd"
+ log "executing post-deploy $ $cmd"
run "cd $path/current && $cmd"
fi

0 comments on commit 0a6160b

Please sign in to comment.