Skip to content

Commit

Permalink
a simple runit example
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Jan 28, 2013
1 parent cd1f96f commit 3a2bd2b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/runit/README.md
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions examples/runit/log/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec svlogd -tt /var/log/sidekiq
4 changes: 4 additions & 0 deletions examples/runit/run
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3a2bd2b

Please sign in to comment.