Skip to content

Instantly share code, notes, and snippets.

@phlegx
Created January 16, 2013 12:11
Show Gist options
  • Save phlegx/4546745 to your computer and use it in GitHub Desktop.
Save phlegx/4546745 to your computer and use it in GitHub Desktop.
set :stages, %w(production staging)
set :default_stage, "staging"
require "capistrano/ext/multistage"
set :application, "myproject-core"
set :repository, "[email protected]:#{application}"
set :bundle_without, [:development]
set :deploy_via, :remote_cache
set :update_vendors, true
set :scm, :git
set :ssh_options, { :forward_agent => true, :compression => false }
set :use_sudo, false
require "rvm/capistrano"
require "bundler/capistrano"
#set :rvm_type, :system
set :rvm_ruby_string, '1.9.3@myproject'
before 'deploy:setup', 'rvm:install_ruby'
after "deploy", "deploy:migrations"
# If you are using Passenger mod_rails uncomment this:
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