Capistrano with Rsync
Capistrano with rsync to deployment hosts from local repository.
Requirements
- Ruby >= 2.0
- Capistrano >= 3.1
- Rsync >= 2.6
Installation
Add this line to your application's Gemfile:
gem 'capistrano-withrsync'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-withrsync
Usage
Capfile:
require 'capistrano/withrsync'
deploy as usual
$ cap deploy
Options
Set capistrano variables with set name, value
.
Name | Default | Description
------------- | -------- | ------------
rsync_src | tmp/deploy | rsync src path
rsync_dest | shared/deploy | rsync dest path
rsync_options | --recursive --delete --delete-excluded
--exclude .git* --exclude .svn* | rsync options
rsync_with_submodules | false | fetch and update git submodules for syncing
Overview
local machine
~/your_project
.
|-- app
|-- config
|-- lib
|-- ...
|-- ...
`-- tmp
`-- deploy (rsync src ==>)
deployment hosts
/var/www/your_project
.
|-- current -> /var/www/your_project/releases/20140219074628
|-- releases
| |-- 20140219062041
| |-- 20140219063022
| `-- 20140219074628
|-- revisions.log
`-- shared
|-- vendor
|-- deploy (==> rsync dest)
`-- log
Contributing
- Fork it ( http://github.com/linyows/capistrano-withrsync/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Author
License
The MIT License (MIT)