Skip to content

Instantly share code, notes, and snippets.

@classpro
Forked from seyhunak/sidekiq.conf
Created August 26, 2019 13:17
Show Gist options
  • Select an option

  • Save classpro/4f7d9fe11bc1af80da484b96fd85c84c to your computer and use it in GitHub Desktop.

Select an option

Save classpro/4f7d9fe11bc1af80da484b96fd85c84c to your computer and use it in GitHub Desktop.

Revisions

  1. @seyhunak seyhunak revised this gist Sep 10, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion sidekiq.sh
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,7 @@
    export HOME=$HOME
    RBENV_ROOT=$HOME/.rbenv
    export PATH="$RBENV_ROOT/bin:$RBENV_ROOT/shims:$PATH"
    cd /home/rails && RAILS_ENV=production bundle exec sidekiq -e production -d -C /home/rails/config/sidekiq.yml
    ruby /home/ubuntu/.rbenv/versions/2.0.0-p353/bin/sidekiq -e production -d -C $HOME/www/appname/config/sidekiq.yml

    # Alternative way
    # cd /home/rails && RAILS_ENV=production bundle exec sidekiq -e production -d -C /home/rails/config/sidekiq.yml
  2. @seyhunak seyhunak revised this gist Sep 10, 2014. 1 changed file with 1 addition and 6 deletions.
    7 changes: 1 addition & 6 deletions sidekiq.sh
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,4 @@
    export HOME=$HOME
    RBENV_ROOT=$HOME/.rbenv
    export PATH="$RBENV_ROOT/bin:$RBENV_ROOT/shims:$PATH"
    cd /home/rails && RAILS_ENV=production bundle exec sidekiq -e production -d -C /home/rails/config/sidekiq.yml



    ### for more information follow this guide.
    https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
    cd /home/rails && RAILS_ENV=production bundle exec sidekiq -e production -d -C /home/rails/config/sidekiq.yml
  3. @seyhunak seyhunak revised this gist Sep 9, 2014. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion sidekiq.sh
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,9 @@
    export HOME=$HOME
    RBENV_ROOT=$HOME/.rbenv
    export PATH="$RBENV_ROOT/bin:$RBENV_ROOT/shims:$PATH"
    cd $HOME/www/introduce_biz && RAILS_ENV=production bundle exec sidekiq -e production -d -C ~/www/introduce_biz/config/sidekiq.yml
    cd /home/rails && RAILS_ENV=production bundle exec sidekiq -e production -d -C /home/rails/config/sidekiq.yml



    ### for more information follow this guide.
    https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
  4. @seyhunak seyhunak revised this gist Sep 9, 2014. 2 changed files with 10 additions and 4 deletions.
    8 changes: 6 additions & 2 deletions sidekiq.conf
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,12 @@

    [program:sidekiq]
    command=/usr/local/bin/sidekiq.sh
    directory=/usr/local/bin/
    user=ubuntu
    startsecs=10
    autostart=true
    autorestart=true
    stdout_logfile=/var/log/supervisor/sidekiq.log
    redirect_stderr=true
    pidfile=~/www/project/tmp/pids/sidekiq.pid
    logfile_maxbytes=1MB
    logfile_backups=10
    redirect_stderr=true
    6 changes: 4 additions & 2 deletions sidekiq.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    /usr/local/bin/sidekiq.sh

    #!/bin/bash
    export PATH=/usr/local/.rbenv/bin:/root/.rbenv/shims/:$PATH;
    cd ~/www/project && bundle exec sidekiq -e production -C ~/www/project/config/sidekiq.yml -P ~/www/project/tmp/pids/sidekiq.pid
    export HOME=$HOME
    RBENV_ROOT=$HOME/.rbenv
    export PATH="$RBENV_ROOT/bin:$RBENV_ROOT/shims:$PATH"
    cd $HOME/www/introduce_biz && RAILS_ENV=production bundle exec sidekiq -e production -d -C ~/www/introduce_biz/config/sidekiq.yml
  5. @seyhunak seyhunak revised this gist Sep 9, 2014. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion digitalocean.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
  6. @seyhunak seyhunak revised this gist Sep 9, 2014. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions digitalocean.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps
  7. @seyhunak seyhunak revised this gist Sep 9, 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
    @@ -6,4 +6,4 @@ autostart=true
    autorestart=true
    stdout_logfile=/var/log/supervisor/sidekiq.log
    redirect_stderr=true
    pidfile=~/www/introduce_biz/tmp/pids/sidekiq.pid
    pidfile=~/www/project/tmp/pids/sidekiq.pid
  8. @seyhunak seyhunak created this gist Sep 9, 2014.
    9 changes: 9 additions & 0 deletions sidekiq.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    /etc/supervisor/conf.d/sidekiq.conf

    [program:sidekiq]
    command=/usr/local/bin/sidekiq.sh
    autostart=true
    autorestart=true
    stdout_logfile=/var/log/supervisor/sidekiq.log
    redirect_stderr=true
    pidfile=~/www/introduce_biz/tmp/pids/sidekiq.pid
    5 changes: 5 additions & 0 deletions sidekiq.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    /usr/local/bin/sidekiq.sh

    #!/bin/bash
    export PATH=/usr/local/.rbenv/bin:/root/.rbenv/shims/:$PATH;
    cd ~/www/project && bundle exec sidekiq -e production -C ~/www/project/config/sidekiq.yml -P ~/www/project/tmp/pids/sidekiq.pid