Skip to content

Instantly share code, notes, and snippets.

@rusllonrails
Last active April 24, 2023 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rusllonrails/bb06cb8aa6f39f8a3005 to your computer and use it in GitHub Desktop.
Save rusllonrails/bb06cb8aa6f39f8a3005 to your computer and use it in GitHub Desktop.
SIDEKIQ RUNIT
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