Created
May 9, 2011 13:25
-
-
Save resure/962512 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
set :user, 'resure' | |
set :domain, '42miles.net' | |
set :application, "milesmain" | |
set :repository, "[email protected]:/home/resure/repositories/milesmain.git" | |
set :deploy_to, "/home/resure/sites/42miles.net" | |
set :rvm_path, "/home/resure/.rvm/gems/ruby-1.9.2-p180" | |
set :default_environment, { | |
'PATH' => "#{rvm_path}/bin:/home/resure/.rvm/bin:$PATH", | |
'RUBY_VERSION' => 'ruby 1.9.2', | |
'GEM_HOME' => rvm_path, | |
'GEM_PATH' => rvm_path, | |
'BUNDLE_PATH' => rvm_path | |
} | |
set :scm, :git | |
role :web, domain | |
role :app, domain | |
role :db, domain, :primary => true | |
set :deploy_via, :remote_cache | |
set :branch, 'master' | |
set :scm_verbose, true | |
set :use_sudo, false | |
namespace :deploy do | |
desc "cause Passenger to initiate a restart" | |
task :restart do | |
run "cp /home/resure/db/42miles.yml #{current_path}/config/database.yml; touch #{current_path}/tmp/restart.txt" | |
end | |
desc "reload the database with seed data" | |
task :seed do | |
run "cd #{current_path}; rake db:seed RAILS_ENV=production" | |
end | |
end | |
after "deploy:update_code", :bundle_install | |
desc "install necessary prerequisites" | |
task :bundle_install, :roles => :app do | |
run "cd #{release_path} && bundle install" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment