Created
September 20, 2016 13:14
-
-
Save SeanRoberts/154386dc5904db4fd58463068b9dbc8d to your computer and use it in GitHub Desktop.
Upstart script for delayed job using rbenv and bundle exec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start on runlevel [2345] | |
stop on runlevel [06] | |
setuid YOUR_USER | |
setgid YOUR_USER | |
env HOME=/home/YOUR_USER | |
env RAILS_ENV=production | |
env PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:/usr/local/bin:/usr/bin:/bin | |
chdir /path/to/your/app | |
exec $HOME/.rbenv/bin/rbenv shell 2.1.0 | |
exec $HOME/.rbenv/shims/bundle exec rake jobs:work RAILS_ENV=production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment