4

I've had a good hunt and can't find a good example of an upstart script for Unicorn.

From what I've read however I think that upstart and unicorn might step on each others toes if I just try to set up a basic upstart config file given that unicorn manages its own workers etc...

Any tips or shortcuts before I dig in myself?

Brendon Muir
  • 223
  • 1
  • 5
  • I would suggest looking at the init.d scripts that have been written for Unicorn. They should provide you with a good starting point. – Matt Farmer Nov 06 '11 at 18:15

1 Answers1

1

You may use this config, but my personal choice is to use BluePill instead. It will give you more flexibility

description "Starts unicorn as the user 'rails'"
start on filesystem
chdir /apps/rails/sample_app
exec sudo -u deployer -i 'rvm ree; unicorn_rails -c /apps/rails/sample_app/config/unicorn.rb -E production' 
respawn