Created
August 2, 2012 18:52
-
-
Save thermistor/3239677 to your computer and use it in GitHub Desktop.
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
set :user, 'application' | |
set :application, 'nayada' | |
set :deploy_to, "/#{user}/rails/#{application}-git" | |
ssh_options[:paranoid] = false | |
ssh_options[:port] = 389 | |
role :app0, "94.127.68.83", :primary => true | |
namespace :deploy do | |
task :default do | |
update | |
precompile_assets | |
restart | |
end | |
task :update do | |
run "cd #{deploy_to}; git checkout db/schema.rb; git pull; bundle install --deployment --without test" | |
end | |
task :migrate do | |
update | |
run "cd #{deploy_to} && RAILS_ENV=production bundle exec rake db:migrate" | |
precompile_assets | |
restart | |
end | |
task :precompile_assets do | |
run "cd #{deploy_to}; bundle exec rake assets:precompile" | |
end | |
task :restart do | |
run "cd #{deploy_to}; mkdir -p tmp && touch tmp/restart.txt;" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment