Capistrano::Scm::Rsync
capistrano-scm-rsync
allows you to use rsync to deploy your application to your servers.
- Tested against Ruby 2.x
- Ruby < 2.0 is not supported
Installation
Add it to your Gemfile
:
gem 'capistrano-scm-rsync'
$ bundle install
Use the plugin with capistrano by adding it to your Capfile
:
require 'capistrano/scm/rsync'
install_plugin Capistrano::SCM::Rsync
Configuration
In your config/deploy.rb
:
set :rsync_options,
# The local directory to be copied to the server.
source: 'app',
# The cache directory on the server that receives files
# from the source directory. Relative to shared_path or
# an absolute path.
# Saves you rsyncing your whole app folder each time. If
# set to nil Capistrano::SCM::Rsync will sync directly to
# the release_path.
cache: 'cache',
# Arguments passed to rsync when...
args: {
# ...copying the local directory to the server.
local_to_remote: [],
# ...copying the cache directory to the release_path.
cache_to_release: %w(--archive --acls --xattrs)
}
Example
See https://github.com/dnugleipzig/deploy.
Development
- Source hosted at GitHub
- Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
Contributing
- Fork it http://github.com/agross/capistrano-scm-rsync/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