1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Update with more detail

This commit is contained in:
Mike Perham 2013-01-30 15:19:51 -08:00
parent 7acc668e56
commit 7d922c690b

View file

@ -1,8 +1,7 @@
# /etc/init/sidekiq.conf - Sidekiq config
# This example config should work with Ubuntu 12.04+ but will need changes for
# older versions of upstart.
# This example config should work with Ubuntu 12.04+
#
# Save this config as /etc/init/sidekiq.conf then mange sidekiq with:
# sudo start sidekiq
# sudo stop sidekiq
@ -10,20 +9,31 @@
#
# or use the service command:
# sudo service sidekiq {start,stop,restart,status}
#
# This is the exact script used to manage Sidekiq on TheClymb.com
#
description "Sidekiq Background Worker System"
start on runlevel [2345]
stop on shutdown
setuid [sidekiq user]
setgid [sidekiq user]
setuid deploy
setgid deploy
respawn
respawn limit 10 5
respawn limit 3 30
script
cd /app/[application]/current
# this script runs in /bin/sh by default
# respawn as bash so we can source in rbenv
exec /bin/bash <<EOT
# use syslog for logging
exec >/dev/kmsg 2>&1
# pull in system rbenv
source /etc/profile.d/rbenv.sh
bundle exec sidekiq -e production -L /app/[applicaiton]/shared/log/sidekiq.log
cd /opt/theclymb/current
exec bin/sidekiq -e production -C config/sidekiq.yml -P tmp/pids/sidekiq.pid
EOT
end script