Unicorn does not employ keep files for its configuration file. This page describes how to customize Unicorn without a keep file.
The process is:
- Create an alternate Unicorn configuration file.
- Start Unicorn with Bundler instead of running the system Unicorn.
To create the customized Unicorn configuration file and restart Unicorn
-
Add this line to the file
/data/_myapp_/shared/config/env.custom
(where myapp is the name of your application):UNICORN_CONF="/data/_myapp_/shared/config/custom_unicorn.rb"
This specifies an alternate configuration file for Unicorn.
Note: If you are using env_vars, then use the env_vars recipe to customize the environment variable. If you are already using the env_vars recipe, it will override your settings here. Use the recipe to customize your Unicorn settings.
-
Copy
/data/_myapp_/shared/config/unicorn.rb
to/data/_myapp_/shared/config/custom_unicorn.rb
. -
Edit the
/data/_myapp_/shared/config/custom_unicorn.rb
with the customizations that you want. -
Restart Unicorn so that the customizations take effect:
/engineyard/bin/app_myapp reload
To start Unicorn in Bundler
-
Add the Unicorn gem to your Gemfile:
gem 'unicorn'
-
Run these commands to update your Gemfile.lock:
bundle install
git commit -a -m "Gemfile updated for Unicorn"
git push origin
If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.
Comments
Article is closed for comments.