Capistrano with rsync to deployment hosts from local repository.
- Ruby >= 2.0
- Capistrano >= 3.1
- Rsync >= 2.6
Add this line to your application's Gemfile:
gem 'capistrano-withrsync'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-withrsync
Capfile:
require 'capistrano/withrsync'
deploy as usual
$ cap deploy
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
~/your_project
.
|-- app
|-- config
|-- lib
|-- ...
|-- ...
`-- tmp
`-- deploy (rsync src ==>)
/var/www/your_project
.
|-- current -> /var/www/your_project/releases/20140219074628
|-- releases
| |-- 20140219062041
| |-- 20140219063022
| `-- 20140219074628
|-- revisions.log
`-- shared
|-- vendor
|-- deploy (==> rsync dest)
`-- log
- 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
The MIT License (MIT)