Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :repository, '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, '' # 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"
task :upload_config_files do
put('config/database.yml'), "#{release_path}/config/database.yml", :mode => 0444)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.