Created
July 11, 2009 18:38
-
-
Save HarryGuerrilla/145348 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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
set :repository, 'git://github.com/username/git-repo.git' # change this to the git repository | |
set :scm, :git | |
set :deploy_via, :copy | |
set :git_shallow_clone, 1 | |
set :user, 'username' # change this to dreamhost username | |
set :application, 'dreamhost.com' # change this to foldername of rails app | |
set :deploy_to, "/home/#{user}/#{application}" | |
set :use_sudo, false | |
set :domain, "#{user}@#{application}" | |
role :app, domain | |
role :web, domain | |
role :db, domain, :primary => true | |
before 'deploy:update_code', 'deploy:web:disable' | |
after 'deploy:update_code', 'deploy:upload_config_files' | |
after 'deploy:restart', 'deploy:cleanup' | |
after 'deploy:restart', 'deploy:web:enable' | |
namespace :deploy do | |
task :restart, :roles => :app do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
task :upload_config_files do | |
put(File.read('config/database.yml'), "#{release_path}/config/database.yml", :mode => 0444) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment