Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

My capistrano recipe for deploying on shared accelerator from a git repo (See related posts)

// deploy.rb - note that the git repo is also hosted on the shared accelerator

before("deploy:restart") { set :use_sudo, false } 
after "deploy:start", :restart_web_server
set :user, "my_user_name"
set :application, "myapp.com"
set :domain, "myapp.com"
set :joyent_primary_domain, "prospect.joyent.us"
set :repository, "ssh://my_user_name@prospect.joyent.us/users/home/my_user_name/git/myapp.git"
set :scm, :git
set :deploy_to, "/users/home/#{user}/domains/#{domain}/web"

set :use_sudo, false
role :app, "#{joyent_primary_domain}"
role :web, "#{joyent_primary_domain}"
role :db,  "#{joyent_primary_domain}", :primary => true

default_run_options[:pty] = true
namespace :deploy do
  desc "Restart Mongrel by killing" 
  task :restart, :roles => :app do
    run "pkill mongrel"
  end
end

Comments on this post

terard posts on Mar 11, 2009 at 16:48
I get "the task `restart_web_server' does not exist" when I run this recipe.
KruGer posts on Feb 13, 2010 at 22:47
denemee
tahsin posts on Feb 23, 2010 at 00:48
Bir deneme de Benden

You need to create an account or log in to post comments to this site.