I have a stack running on ubuntu consisting of a Rack application written in Sinatra and GrapeAPI. The application stack includes Redis, Postgres, Nginx and unicorn. I want to use god to handle process monitoring.
Currently deployment's are made under a deploy user via git. This deployment user is not a sudoer. My question: Who should own the god process? Is it best to run that process as a sudoer or the deploy user?
Running as the deploy user will load rbenv allowing unicorn to start however the deploy user does not have sudo access so will not be able to run init.d scripts.
On the other hand when I am running as a different user the the deploy user then god does not have access to bundle exec provided by rbenv and there for can't start up the unicorn processes if they go down.