Created
October 31, 2008 06:06
-
-
Save zackchandler/21236 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 :application, 'myproject' | |
set :domain, 'myproject.com' | |
set :deploy_to, "/var/www/apps/#{application}" | |
set :scm, :git | |
set :deploy_via, :remote_cache | |
set :repository, "zackchandler@depixelate.com:/git/#{application}.git" | |
set :use_sudo, false | |
role :web, domain | |
role :app, domain | |
role :db, domain, :primary => true | |
after 'deploy:update_code', 'deploy:native_gems' | |
namespace :deploy do | |
# override Rails related callbacks | |
task :finalize_update do | |
end | |
task :migrate do | |
end | |
desc 'recompile native gems' | |
task :native_gems do | |
run "cd #{latest_release};bin/thor merb:dependencies:redeploy" | |
end | |
desc 'restart app' | |
task :restart do | |
run "mkdir -p #{latest_release}/tmp; touch #{latest_release}/tmp/restart.txt" | |
end | |
desc 'Restart apache' | |
task :restart_apache, :roles => :web do | |
sudo '/etc/init.d/apache2 restart' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment