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:
parent
7acc668e56
commit
7d922c690b
1 changed files with 18 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue