Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Created February 17, 2009 18:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jpemberthy/65878 to your computer and use it in GitHub Desktop.
Save jpemberthy/65878 to your computer and use it in GitHub Desktop.
load 'deploy' if respond_to?(:namespace)
set :application, "acoplet"
set :user, "acoplet"
set :use_sudo, false
set :scm, :git
set :repository, "git@github.com:jpemberthy/acoplet.git"
set :deploy_via, :remote_cache
set :deploy_to, "/home/#{user}/www/#{application}"
role :app, "201.232.143.199"
role :web, "201.232.143.199"
role :db, "201.232.143.199", :primary => true
set :runner, user
set :admin_runner, user
namespace :deploy do
task :start, :roles => [:web, :app] do
run "cd #{deploy_to}/current && nohup thin -C thin/production_config.yml -R config.ru start"
end
task :stop, :roles => [:web, :app] do
run "cd #{deploy_to}/current && nohup thin -C thin/production_config.yml -R config.ru stop"
end
task :restart, :roles => [:web, :app] do
deploy.stop
deploy.start
end
# This will make sure that Capistrano doesn't try to run rake:migrate (this is not a Rails project!)
task :cold do
deploy.update
deploy.start
end
end
namespace :acoplet do
task :log do
run "cat #{deploy_to}/current/log/thin.log"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment