Last active
January 18, 2020 02:02
-
-
Save seyhunak/417bff4cd84e0f8469c2 to your computer and use it in GitHub Desktop.
Sidekiq - Supervisord Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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