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?

  • 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 6 '11 at 18:15
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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.