Skip to content

Instantly share code, notes, and snippets.

@rorrego
Created August 29, 2008 01:30
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/7875 to your computer and use it in GitHub Desktop.
Save rorrego/7875 to your computer and use it in GitHub Desktop.
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"
#"metrik@pvm.multiexportfoods.com:/home/metrik/repos/#{application}.git"
set :domain, 'animalita.cl'
# If you aren't deploying to /u/apps/#{application} on the target # servers (which is the default), you can specify the actual location # via the :deploy_to variable:
set :deploy_to, "#{dir_base}/#{application}"
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
set :user, "xxx"
set :runner, "mongrel"
set :use_sudo, true # If you aren't using Subversion to manage your source code, specify # your SCM below:
set :scm, "git"
default_run_options[:pty] = true
#set :repository, "git@github.com:vanpelt/rails-app.git"
#set :scm, "git"
set :scm_passphrase, "dev" #This is your custom users password
set :scm_verbose, true
set :user, "xxx"
set :deploy_via, :remote_cache
role :app, domain
role :web, domain
ssh_options[:port] = 28500
#ssh_options[:forward_agent] = true
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 :after_update_code do run "cp -f #{shared_path}/system/mongrel_cluster.yml #{release_path}/config/mongrel_cluster.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