diff --git a/examples/upstart/manage-many/sidekiq.conf b/examples/upstart/manage-many/sidekiq.conf index 8c3aa5212..2fab06f07 100644 --- a/examples/upstart/manage-many/sidekiq.conf +++ b/examples/upstart/manage-many/sidekiq.conf @@ -21,8 +21,9 @@ description "Sidekiq Background Worker" stop on (stopping sidekiq-manager or runlevel [06]) # change apps to match your deployment user if you want to use this as a less privileged user (recommended!) -# setuid apps -# setgid apps +# setuid deploy +# setgid deploy +# env HOME=/home/apps respawn respawn limit 3 30 @@ -35,12 +36,7 @@ instance ${app}-${index} script # this script runs in /bin/sh by default # respawn as bash so we can source in rbenv -exec /bin/bash < /dev/kmsg - - export HOME=/home/apps - +exec /bin/bash <<'EOT' # Pick your poison :) Or none if you're using a system wide installed Ruby. # rbenv # source /home/apps/.bash_profile @@ -54,6 +50,8 @@ exec /bin/bash < /dev/kmsg - - export HOME=/home/apps - +exec /bin/bash <<'EOT' # Pick your poison :) Or none if you're using a system wide installed Ruby. # rbenv # source /home/apps/.bash_profile @@ -81,7 +74,9 @@ exec /bin/bash < /dev/null EOT end script diff --git a/examples/upstart/manage-one/sidekiq.conf b/examples/upstart/manage-one/sidekiq.conf index 05e370edb..10ef47d94 100644 --- a/examples/upstart/manage-one/sidekiq.conf +++ b/examples/upstart/manage-one/sidekiq.conf @@ -21,14 +21,15 @@ description "Sidekiq Background Worker" stop on (stopping workers or runlevel [06]) # change to match your deployment user -setuid deploy -setgid deploy -env HOME=/home/deploy +# setuid deploy +# setgid deploy +# env HOME=/home/deploy respawn respawn limit 3 30 -# TERM is sent by sidekiqctl when stopping sidekiq. Without declaring these as normal exit codes, it just respawns. +# TERM is sent by sidekiqctl when stopping sidekiq. Without declaring these as +# normal exit codes, it just respawns. normal exit 0 TERM instance $index @@ -37,18 +38,20 @@ script # 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 - - # pull in system rbenv - source /etc/profile.d/rbenv.sh - # or - # pull in user installed rbenv - # export PATH="$HOME/.rbenv/bin:$PATH" - # eval "$(rbenv init -)" - # export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" - - cd /opt/theclymb/current + # Pick your poison :) Or none if you're using a system wide installed Ruby. + # rbenv + # source /home/apps/.bash_profile + # OR + # source /home/apps/.profile + # OR system: + # source /etc/profile.d/rbenv.sh + # + # rvm + # source /home/apps/.rvm/scripts/rvm + + # Logs out to /var/log/upstart/sidekiq.log by default + + cd /var/www/app exec bin/sidekiq -i ${index} -e production EOT end script