Created
February 11, 2011 21:56
-
-
Save chrismytton/823120 to your computer and use it in GitHub Desktop.
Capistrano with rvm, bundler and git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh_options[:forward_agent] = true | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
require "bundler/capistrano" | |
set :rvm_ruby_string, "ree@myapp" | |
set :application, "myapp" | |
set :repository, "git@github.com:username/#{application}.git" | |
set :scm, :git | |
set :use_sudo, false | |
set :user, "deploy" | |
set :deploy_to, "/data/#{application}" | |
set :branch, :master | |
set :deploy_via, :remote_cache | |
role :web, "myapp.com" # Your HTTP server, Apache/etc | |
role :app, "myapp.com" # This may be the same as your `Web` server | |
# If you are using Passenger mod_rails uncomment this: | |
# if you're still using the script/reapear helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# namespace :deploy do | |
# task :start do ; end | |
# task :stop do ; end | |
# task :restart, :roles => :app, :except => { :no_release => true } do | |
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
# end | |
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require "rvm/capistrano" | |
require "bundler/capistrano" | |
set :rvm_ruby_string, "ree@myapp" | |
set :application, "myapp" | |
set :repository, "git@github.com:username/myapp.git" | |
set :scm, :git | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
set :use_sudo, false | |
set :user, "deploy" | |
set :deploy_to, "/data/myapp" | |
set :branch, :master | |
set :deploy_via, :remote_cache | |
role :web, "myapp.com" # Your HTTP server, Apache/etc | |
role :app, "myapp.com" # This may be the same as your `Web` server | |
# If you are using Passenger mod_rails uncomment this: | |
# if you're still using the script/reapear helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# namespace :deploy do | |
# task :start do ; end | |
# task :stop do ; end | |
# task :restart, :roles => :app, :except => { :no_release => true } do | |
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
# end | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment