0

I'm currently running Apache with Passenger and a Rails 3.1 application. In my environment setup, I need to start sunspot - rake sunspot:solr:start RAILS_ENV=production - before I run the server. Since the server starts auto-magically when Apache starts, I'm not entirely sure how to do this.

How can I run a list of commands before the Rails server starts?

1 Answers1

0

You can write a Upstart config (or install Solr with Tomcat) to start Solr use a stanza like below:

start on starting apache2

This makes Solr will be started before Apache.

quanta
  • 51,413
  • 19
  • 159
  • 217