Browse files

Update version, readme and gemspec.

  • Loading branch information...
1 parent 4e679ea commit 3ac85429b3f6f140cb8aa57da99ecb3bfe574fd7 @rkistner rkistner committed Nov 20, 2012
Showing with 52 additions and 6 deletions.
  1. +47 −1
  2. +4 −4 foreman_god.gemspec
  3. +1 −1 lib/foreman_god/version.rb
@@ -1,9 +1,11 @@
# ForemanGod
-God configuration with Procfiles.
+Monitor Procfiles with [God](
## Installation
+Install the gem on the machine running god - there is no need to include it as a dependency in your project.
$ gem install foreman_god
## Usage
@@ -24,6 +26,50 @@ To specify foreman options, add a .foreman file next to the Procfile.
See samples/configuration for a complete example.
+### Restarting workers
+If present, the `tmp/restart.txt` file in your project is watched for changes. If this file is modified, for example
+with `touch tmp/restart.txt`, all workers are restarted.
+### Reloading the Procfile
+When the Procfile (or .env or .foreman files) changed, use `god load <god config> stop` to reload the config files.
+The `stop` action tells god to stop any processes that were removed from the Procfile (available since god 0.12.0,
+but not documented at the time of writing).
+### RVM
+To run god itself with RVM, use a wrapper script as explained at [](
+Using RVM is tricky when running God as root. Often you would want to run the commands in a different environment from
+god (different user, different Ruby, different gems, etc).
+The simplest way to tell ForemanGod to run your processes with RVM, is to specify `rvm: default` in your .foreman config
+file. This tells ForemanGod to use the "default" Ruby version to run the script. Alternatively you can specify a
+specific ruby version or gemset, for example `rvm: ruby-1.9.3-p194` or `rvm: ruby-1.9.3-p194@global`.
+Technically this loads the environment for the ruby/gemset version, which is found in either `~/.rvm/environments/<version>`
+or `/usr/local/rvm/<version>`. This is similar to the approach for [Cron scripts](
+### Capistrano
+On each deployment, God needs to reload the configuration. Restarting of the processes happen with the `tmp/restart.txt`
+solution explained earlier, which you already do if you're using Passenger.
+Use a task like the following to reload the configuration (see *Reloading the Procfile* above):
+ namespace :god do
+ task :reload do
+ # Replace the god command and config file here with the ones used on your server
+ run("god load /etc/god/master.god stop")
+ end
+ end
+ before "deploy:restart", "god:reload"
## Contributing
1. Fork it
@@ -8,15 +8,15 @@ do |gem|
gem.version = ForemanGod::VERSION
gem.authors = ["Ralf Kistner"] = [""]
- gem.description = %q{God configuration with Procfiles}
- gem.summary = %q{Configure God using foreman-style Procfiles.}
+ gem.description = %q{Monitor Procfiles with God. Mostly compatible with foreman.}
+ gem.summary = %q{Monitor Procfiles with God}
gem.homepage = ""
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
- gem.add_dependency 'foreman'
- gem.add_dependency 'god'
+ gem.add_dependency 'foreman', '~> 0.60.2'
+ gem.add_dependency 'god', '>= 0.12.0'
@@ -1,3 +1,3 @@
module ForemanGod
- VERSION = "0.0.1"
+ VERSION = "0.0.2"

0 comments on commit 3ac8542

Please sign in to comment.