This script is used to restart unicorn instances. Typically useful for when multiple unicorn instances are required.
Out of the box, bundler is required. Though the init_unicorn function can be edited in order to run specific commands in order to initialize the unicorn instance.
Within the script, there are 4 variables that need to be set:
- Set the
APP_PATHvariable to point to your rails application - Set the
PID_FILEvariable to point to where your pid file will be placed. - Set the
UNICORN_CONFIGvariable to point to yourunicorn.rbfile - Set the
RAILS_ENVvariable
run_unicorn on
run_unicorn off
run_unicorn restart