Last active
April 24, 2023 09:15
-
-
Save rusllonrails/bb06cb8aa6f39f8a3005 to your computer and use it in GitHub Desktop.
SIDEKIQ RUNIT
This file contains 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
sudo apt-get install runit | |
cd /etc/sv/ | |
mkdir sidekiq | |
cd sidekiq | |
nano run | |
``` | |
#!/bin/sh | |
cd /home/deployer/application/current/ | |
exec 2>&1 | |
exec chpst -udeployer bundle exec sidekiq -e production -P /home/deployer/application/current/tmp/pids/sidekiq.pid -L /home/qeployer/application/current/log/sidekiq.log | |
``` | |
/etc/sv/sidekiq# chmod 755 run | |
ln -s /etc/sv/sidekiq /etc/service/sidekiq | |
sudo reboot | |
``` | |
cd /etc/sv/sidekiq/ | |
chmod 755 supervise/ | |
chown deployer ./supervise/ok ./supervise/control ./supervise/status | |
``` | |
Check status: | |
``` | |
sv status sidekiq | |
sv check sidekiq | |
``` | |
Runit Log can be checked at: | |
``` | |
/var/log/upstart/runsvdir.log | |
``` | |
More details at http://smarden.org/runit/faq.html#user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment