Skip to content

Instantly share code, notes, and snippets.

@thermistor
Created August 2, 2012 18:52
Show Gist options
  • Save thermistor/3239677 to your computer and use it in GitHub Desktop.
Save thermistor/3239677 to your computer and use it in GitHub Desktop.
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