Skip to content

Instantly share code, notes, and snippets.

@danielnolan
Last active January 2, 2016 11:59
Show Gist options
  • Save danielnolan/8300201 to your computer and use it in GitHub Desktop.
Save danielnolan/8300201 to your computer and use it in GitHub Desktop.

Revisions

  1. danielnolan revised this gist Jan 7, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sidekiq.conf
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ exec /bin/bash <<EOT

    export HOME=/home/deploy
    source /home/deploy/.bash_profile
    cd /home/deploy/huntingtales.com/current
    cd /home/deploy/{site_name}/current

    bin/sidekiq -e production -C config/sidekiq.yml -i 0 -P tmp/pids/sidekiq.pid
    EOT
  2. danielnolan renamed this gist Jan 7, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. danielnolan created this gist Jan 7, 2014.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    description "Sidekiq Background Worker"

    start on filesystem
    stop on runlevel [06]

    respawn
    respawn limit 3 30

    # change to match your deployment user
    setuid deploy
    setgid deploy

    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

    export HOME=/home/deploy
    source /home/deploy/.bash_profile
    cd /home/deploy/huntingtales.com/current

    bin/sidekiq -e production -C config/sidekiq.yml -i 0 -P tmp/pids/sidekiq.pid
    EOT
    end script