Created
October 18, 2011 13:44
-
-
Save jonpaul/1295457 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
default_run_options[:pty] = true | |
set :rvm_ruby_string, '1.9.2-p290' # Or whatever env you want it to run in. | |
set :application, "masterdatamachine" | |
set :domain, '50.57.132.151' | |
set :applicationdir, "/var/www/#{application}" | |
set :repository, "[email protected]:glideint/Master-Data-Machine.git" | |
set :scm, :git | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
set :user, 'deploy' | |
set :scm_passphrase, '1q2w3e4r!QAZ' | |
set :use_sudo, false | |
set :deploy_to, "/var/www/#{application}" | |
set :deploy_via, :remote_cache | |
set :branch, 'master' | |
role :web, domain # Your HTTP server, Apache/etc | |
role :app, domain # This may be the same as your `Web` server | |
role :db, domain, :primary => true # This is where Rails migrations will run | |
# if you're still using the script/reaper helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# If you are using Passenger mod_rails uncomment this: | |
after "deploy", "deploy:bundle_gems" | |
after "deploy", "rvm:trust_rvmrc" | |
after "deploy:bundle_gems", "deploy:restart" | |
after "deploy:finalize_update", "db:dbconfigs" | |
namespace :rvm do | |
task :trust_rvmrc do | |
run "rvm rvmrc trust #{release_path}" | |
end | |
end | |
namespace :db do | |
task :db_configs, :except => { :no_release => true }, :role => :app do | |
run "ln -s ~/database.yml #{release_path}/config/database.yml" | |
end | |
end | |
namespace :deploy do | |
task :bundle_gems do | |
run "cd #{deploy_to}/current && bundle install --deployment" | |
end | |
task :start do | |
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
end | |
task :stop do ; end #Not used | |
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