Thanks for this. Waiting for Passenger to crank up was always an irritant but never thought to fix it.
Just want to submit a variation of yours (I'm on Brightbox btw): # near the top of my deploy.rb I've set the domain: # set :domain, "mywebapp.com" task :ensure_alive do puts "Pinging the server to ensure Passenger has launched up." cmd = "curl https://#{fetch(:domain)}" system(cmd) end On Oct 11, 8:56 pm, Nadal <[email protected]> wrote: > Anytime I go to site after cap production deploy, the site taks a > while to come up. In order to ensure that site is pinged after deploy > I added following code to ~/deploy/production.rb > > server 'www.domain.com', :app, :web, :db, :primary => true > set :branch, "master" > > after "deploy", "ensure_alive" > > task :ensure_alive do > cmd = "curlhttp://www.domain.com" > system(cmd) > end > > It works. However I have repeatedwww.domain.comat the top and also > in my task "ensure_alive". Is there a way for me to get acces > towww.domain.comdeclared at the top inside my task. > > Thanks -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
