sosedoff/capistrano-unicorn — pull request #53 by cschramm (2013-04-14 08:29:07+00:00)
Title: Allow to defined arbitrary options for unicorn

Scenario: One wants to run multiple instances of the same application (e. g. staging and production).

Solution in current master: Move config/unicorn.rb to config/unicorn/staging.rb and config/unicorn/production.rb and use different listen statements. I think this is ugly since 99 % of those files will be duplication and you will need another one for development. So you probably duplicate your unicorn configuration to at least three files.

Solution with this patch: set :unicorn_options, '--host 127.0.0.1 --port 8001' for one stage and set :unicorn_options, '--host 127.0.0.1 --port 8002' for the other one.

The underlying problem is that environment-specific configuration files for unicorn do not include a common configuration file, while for capistrano they do.