Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danp/heroku-buildpack-runit
Run multiple processes in a Heroku dyno, managed by runit
https://github.com/danp/heroku-buildpack-runit
Last synced: 26 days ago
JSON representation
Run multiple processes in a Heroku dyno, managed by runit
- Host: GitHub
- URL: https://github.com/danp/heroku-buildpack-runit
- Owner: danp
- Created: 2013-04-26T21:00:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-08-04T19:38:53.000Z (over 2 years ago)
- Last Synced: 2023-04-12T16:10:57.864Z (over 1 year ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 74
- Watchers: 7
- Forks: 32
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# heroku-buildpack-runit
A buildpack to run mulitple processes within a dyno via [runit](http://smarden.org/runit/).
## Why?
Imagine you want to run nginx in your `web` dynos, binding to `$PORT`, and fronting unicorn. You want them to run individually as if they were specified directly in the `Procfile` (including output to the log stream) without worrying about daemonizing.
## Usage
You'll probably use this in conjunction with [multiple buildpacks](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app).
For every process type (eg `web`) you want to run mulitple processes in, add an entry like this to your `Procfile`:
```
web: bin/runsvdir-dyno
```Then, create a `Procfile.web` file (where `web` matches the process type in `Procfile`). It might look like this:
```
nginx: bin/nginx-runner -p $PORT ...
unicorn: bundle exec unicorn -c config/unicorn.rb ...
```Now, when running a `web` dyno, both the `nginx` and `unicorn` processes will run under runit.
If any process specified in `Procfile.web` crashes, the entire dyno will be restarted.