And if you don't want any output cluttering up your deploy use this instead:
cmd = "curl -silent https://#{fetch(:domain)} >/dev/null" On Oct 21, 2:53 pm, Joshua Pinter <joshuapin...@gmail.com> wrote: > 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 <node.j...@gmail.com> 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.comatthe top and also > > in my task "ensure_alive". Is there a way for me to get acces > > towww.domain.comdeclaredat 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 capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en