1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #663 from jtimberman/runit-example

a simple runit example
This commit is contained in:
Mike Perham 2013-01-28 15:44:04 -08:00
commit 77a0156e3f
3 changed files with 22 additions and 0 deletions

16
examples/runit/README.md Normal file
View file

@ -0,0 +1,16 @@
This is a "service" directory for sidekiq. You should probably modify
the relevant paths in the run script, and the log/run script, if
necessary. It assumes a "sidekiq" user is created that will run the
sidekiq process. To supervise under runit, link this directory to the
runsvdir for your system (e.g., `/etc/service` on Debian/Ubuntu).
If you're using Chef, use the
[example cookbook](https://github.com/mperham/sidekiq/tree/master/examples/chef/cookbooks/sidekiq)
(modified for your environment), and Opscode's
[runit cookbook](http://ckbk.it/runit) to set up the service.
Author: Joshua Timberman <joshua@opscode.com>
Runit is written by Gerrit Pape.
* http://smarden.org/runit

2
examples/runit/log/run Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
exec svlogd -tt /var/log/sidekiq

4
examples/runit/run Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
cd /path/to/sidekiq
exec 2>&1
exec chpst -usidekiq bundle exec sidekiq -e production -P /var/run/sidekiq/sidekiq.pid