Created
January 16, 2010 23:21
-
-
Save mguterl/279082 to your computer and use it in GitHub Desktop.
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
# this goes in /etc/sv/rm-dj-1/run | |
#!/bin/sh | |
set -e | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
APP_ROOT=/home/deploy/public_html/rm/current | |
cd $APP_ROOT | |
exec 2>&1 | |
exec chpst -u deploy:deploy -e /etc/service/rm-dj-1/env rake jobs:work |
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
# this goes in /etc/sv/rm-dj-1/log/run | |
#!/bin/sh | |
set -e | |
exec svlogd ./main |
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
check process rm_dj_worker_1 | |
with pidfile /etc/sv/rm-dj-1/supervise/pid | |
start program = "/usr/bin/sv up rm-dj-1" as uid root and gid root with timeout 3000 seconds | |
stop program = "/usr/bin/sv down rm-dj-1" as uid root and gid root with timeout 3000 seconds | |
group delayed_job | |
if totalmem > 175 Mb then restart | |
if changed pid then restart | |
if 3 restarts within 5 cycles then timeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment