opscode-cookbooks/supermarket — pull request #59 by raskchanky (2014-09-08 21:14:47+00:00)
Title: run bundle exec as the supermarket user

I'm not entirely certain this is the right thing to do, but allow me to explain my rationale for this change.

Earlier today, the unicorn died on the supermarket-staging node and when I tried to restart it, this message showed up in the logs:

![](https://dl.dropboxusercontent.com/s/uca5y49a1i2oimm/2014-09-08%20at%201.03%20PM.png?dl=0)

which prevented unicorn from starting. Since PG uses peer auth, it seems to make sense that unicorn would need to be run as the supermarket user, since that's also the db user. Also, I think that without this change, unicorn runs as root, which seems bad.

The part I can't explain is how this worked last week and not today.