Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sidekiq - Supervisord Configuration
/etc/supervisor/conf.d/sidekiq.conf
[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
logfile_maxbytes=1MB
logfile_backups=10
redirect_stderr=true
/usr/local/bin/sidekiq.sh
#!/bin/bash
export HOME=$HOME
RBENV_ROOT=$HOME/.rbenv
export PATH="$RBENV_ROOT/bin:$RBENV_ROOT/shims:$PATH"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.