All examples here for deploy RoR application with unicorn, staging machine (where we deploys) available via ssh by ssh_key.
Deploy via remote_cache:
require 'rvm/capistrano'
require 'bundler/capistrano'
set :application, '_proj_'
set :rails_env, 'production'
set :domain, '_user@your_deploy_domain_'
set :deploy_to, "_path_to_#{application}"
set :use_sudo, false
set :unicorn_conf, "#{deploy_to}/current/config/unicorn.rb"
set :unicorn_pid, "#{deploy_to}/shared/pids/u...
Install capistrano:
add to Gemfile
group :development do
gem 'capistrano'
gem 'rvm-capistrano'
end
Then cd to project root folder and run:
bundle install
capify .
setup your config/deploy.rb
file, here some useful examples
cap deploy:setup #before first deploy
cap deploy:check #before first deploy
cap deploy:cold # for first deploy
cap deploy #for subsequent deploys