Skip to content

Instantly share code, notes, and snippets.

@cracell
Created May 21, 2009 23:19
Show Gist options
  • Save cracell/115817 to your computer and use it in GitHub Desktop.
Save cracell/115817 to your computer and use it in GitHub Desktop.
#############################################################
# Application
#############################################################
set :application, "is_that_odd"
set :deploy_to, "/mnt/app/#{application}"
set :repository, "repo"
#############################################################
# Settings
#############################################################
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :use_sudo, true
set :scm_verbose, true
#############################################################
# Servers
#############################################################
set :user, "rails"
set :password, 'password'
set :domain, "domain.com"
set :primary_server, "174.143.26.183"
#############################################################
# Git
#############################################################
set :scm, :git
set :scm_user, 'user'
set :branch, "master"
set :deploy_via, :remote_cache
role :app, primary_server
role :web, primary_server
role :db, primary_server, :primary => true
#############################################################
# Deploy tasks
#############################################################
desc "Make all necessary symlinks"
task :after_update_code, :roles => :app do
run "ln -s #{release_path}/config/database.deploy.yml #{release_path}/config/database.yml"
end
#############################################################
# Deploy for Passenger
#############################################################
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
end
[:start, :stop].each do |t|
desc "#{t} task is a no-op with mod_rails"
task t, :roles => :app do ; end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment