Capistrano with Rsync

Capistrano with rsync to deployment hosts from local repository.

Gem version Wercker

Requirements

  • Ruby >= 2.0
  • Capistrano >= 3.1
  • Rsync >= 2.6

Installation

Add this line to your application’s Gemfile:

“by gem ‘capistrano-withrsync’

And then execute:

“ $ bundle

Or install it yourself as:

“ $ gem install capistrano-withrsync

Usage

Capfile:

“by require ‘capistrano/withrsync’

deploy as usual

“ $ cap deploy

Options

Set capistrano variables with set name, value.

NameDefaultDescription
rsync_srctmp/deployrsync src path
rsync_destshared/deployrsync dest path
rsync_options–recursive –delete –delete-excluded
–exclude .git* –exclude .svn*
rsync options
rsync_with_submodulesfalsefetch and update git submodules for syncing

Overview

local machine

“g ~/your_project . |– app |– config |– lib |– … |– … -- tmp – deploy (rsync src ==>)

deployment hosts

“g /var/www/your_project . |– current -> /var/www/your_project/releases/20140219074628 |– releases | |– 20140219062041 | |– 20140219063022 | -- 20140219074628 |-- revisions.log – shared |– vendor |– deploy (==> rsync dest) `-- log

Contributing

  1. Fork it ( http://github.com/linyows/capistrano-withrsync/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

License

The MIT License (MIT)