why not ben

ben tucker's virtual life. work, doings, incoming.

May 10, 2010 at 5:33pm
home

Run Thinking Sphinx as a specific user via Capistrano

Thinking Sphinx comes with some very convenient capistrano tasks.  We run each of our apps with their own daemon account which we also want the sphinx process to run under.  By default the capistrano tasks will run sphinx under your user account.  One easy solution is to define the following in your Capfile (or config/deploy.rb):

  set :rake, "sudo -u sphinx_user rake"

Notes