Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
capistrano-rsync-local
Advanced tools
Deploy with Rsync to your server from any local (or remote) repository when using Capistrano. Saves you from having to install Git on your production machine and allows you to customize which files you want to deploy. Also allows you to easily precompile things on your local machine before deploying.
>= 3.0.0pre14
and
< 4
.--exclude
options.Using Mina instead of Capistrano? I've (actuall not me, but Moll) built Mina::Rsync as well.
Install with:
gem install capistrano-rsync-local
Require it at the top of your Capfile
(or config/deploy.rb
):
require "capistrano/rsync"
Set some rsync_options
to your liking:
set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*]
And after setting regular Capistrano options, deploy as usual!
cap deploy
rsync_stage
(defaults to
tmp/deploy
) on your local machine.branch
variable (defaults to master
).rsync_cache
set (defaults to shared/deploy
), rsyncs to that directory
on the server.rsync_cache
set, copies the content of that directory to a new release
directory.rsync_cache
is nil
, rsyncs straight to a new release directory.After that, Capistrano takes over and runs its usual tasks and symlinking.
If you don't want to deploy everything you've committed to your repository, pass
some --exclude
options to Rsync:
set :rsync_options, %w[
--recursive --delete --delete-excluded
--exclude .git*
--exclude .svn*
--exclude /config/database.yml
--exclude /test/***
]
Capistrano::Rsync runs rsync:stage
before rsyncing. Hook to that like this:
task :precompile do
Dir.chdir fetch(:rsync_stage) do
system "rake", "assets:precompile"
end
end
after "rsync:stage", "precompile"
cap rsync:release
Set Capistrano variables with set name, value
.
Name | Default | Description |
---|---|---|
rsync_scm | git | Available options: git , svn . |
rsync_scm_username | nil | Used for Svn (Optional). |
rsync_scm_password | nil | Used for Svn (Optional). |
repo_url | . | The path or URL to a SCM repository to clone from. |
branch | master | The Git branch to checkout. This is ignored for Svn. |
rsync_stage | tmp/deploy | Path where to clone your repository for staging, checkouting and rsyncing. Can be both relative or absolute. |
rsync_cache | shared/deploy | Path where to cache your repository on the server to avoid rsyncing from scratch each time. Can be both relative or absolute. Set to nil if you want to disable the cache. |
rsync_options | [] | Array of options to pass to rsync . |
rsync_local_repo | false | The flag of the local repository, it disables any request to the scm |
rsync_with_ext | false | Enables checking out an external project |
repo_ext_url | nil | The URL of the external project. Required if rsync_with_ext is true. |
rsync_ext_stage | tmp/deploy_ext | Path where to clone the external project. |
Capistrano::Rsync is released under a Lesser GNU Affero General Public License, which in summary means:
For more convoluted language, see the LICENSE
file.
FAQs
Unknown package
We found that capistrano-rsync-local demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.