-
-
Save phongnh/7c315c7d27cd91f5b226967031bd14d8 to your computer and use it in GitHub Desktop.
Upstart script to run delayed_job, with a weird rvm hack
This file contains hidden or 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
# /etc/init/delayed_job.conf | |
# Note that you have to modify script/delayed_job's shebang line to have the correct ruby path | |
description "Delayed_job for a Rails app" | |
author "Brent Miller <[email protected]>" | |
start on started mysql | |
stop on stopping mysql | |
respawn | |
exec su deployer -c '/usr/local/rvm/bin/rvm && cd /home/deployer/app/current && script/delayed_job run RAILS_ENV=production >> /home/deployer/app/current/log/delayed_job.log 2>&1' |
This file contains hidden or 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
# /etc/sudoers.d/restart | |
# This file needs to be chmod 0440 | |
deployer ALL = (root) NOPASSWD:NOEXEC: /sbin/restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment