Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 F Nov 6 '11 at 18:15

1 Answer 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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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