updating rdig on deploy

published Oct 16, 2007

Here’s a simple little Capistrano 2.0 recipe to update your rdig search index after every deploy.

Add the following lines to config/deploy.rb

namespace :deploy do
  after :deploy, "deploy:update_rdig"
  desc "Update the rdig database.  This has to be done after
        re-starting,  as it looks at the live web-site"
  task :update_rdig do
    run "cd #{current_path} && rdig -c config/rdig_config.rb"

This will run automatically after every deploy. If you just want to run it manually, comment out the line that starts with after ....
You can then run it manually with cap deploy:update_rdig

blog comments powered by Disqus