/capistrano-withrsync

Capistrano with rsync to deployment hosts from local repository.

Primary LanguageRubyMIT LicenseMIT

Capistrano with Rsync

Capistrano with rsync to deployment hosts from local repository.

Gem version

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

  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)