Skip to content

Instantly share code, notes, and snippets.

@rorrego
Created August 28, 2008 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rorrego/7782 to your computer and use it in GitHub Desktop.
Save rorrego/7782 to your computer and use it in GitHub Desktop.
default_run_options[:pty] = true
set :ruby, "/usr/local/bin/ruby"
set :mongrel_rails, "/usr/local/bin/mongrel_rails"
set :dir_base, "/home/animalita"
set :application, "artenlinea"
set :repository, "git@github.com:michelson/#{application}.git"
set :domain, 'animalita.cl'
ssh_options[:port] = 28500
set :deploy_to, "#{dir_base}/#{application}"
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
set :user, "animalita"
set :runner, "mongrel"
set :use_sudo, true
set :scm, :git
set :scm_passphrase, "p@ssw0rd" #This is your custom users password
set :branch, "master"
set :deploy_via, :remote_cache
role :app, domain
role :web, domain
role :db, domain, :primary => true
namespace :deploy do
desc "Run this after every successful deployment"
task :after_default do
cleanup
end
desc "Run this after update code"
task :after_update_code do
run "cp -f #{shared_path}/system/database.yml #{release_path}/config/database.yml"
end
task :start do
invoke_command "#{ruby} #{mongrel_rails} cluster::start -C #{mongrel_conf}" , :via => run_method
end
task :stop do
invoke_command "#{ruby} #{mongrel_rails} cluster::stop -C #{mongrel_conf}" , :via => run_method
end
task :restart do
invoke_command "#{ruby} #{mongrel_rails} cluster::restart -C #{mongrel_conf}" , :via => run_method
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment