Skip to content

Instantly share code, notes, and snippets.

@cofemei
Created December 8, 2010 08:03
Show Gist options
  • Select an option

  • Save cofemei/733017 to your computer and use it in GitHub Desktop.

Select an option

Save cofemei/733017 to your computer and use it in GitHub Desktop.
set :default_stage, "staging"
default_run_options[:pty] = true
set :rails_env, default_stage
set :application, app_name_#{rails_env}
set :deploy_to, "/u/apps/#{application}_#{rails_env}"
set :domain, server_name
set :repository, repo_url
set :use_sudo, false
set :scm, :git
set :branch, "master"
set :deploy_via, "remote_cache"
ssh_options[:forward_agent] = true
ssh_options[:paranoid] = false
set :user, deploy_user
set :runner, user
role :app, domain
role :web, domain
role :db, domain, :primary => true
namespace :deploy do
desc "Restarting passenger"
task :restart, :roles => :app 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
task :update_config, :roles => [:app] do
run "cp -Rf #{shared_path}/config/* #{release_path}/config/"
end
after "deploy:update_code", :update_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment