-
-
Save leandro/404175 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: unicorn_github | |
# Script used to start unicorn in GitHub staging and production environments. | |
# This is called primarily by god. | |
set -e | |
# configure GC settings | |
export RUBY_HEAP_MIN_SLOTS=800000 | |
export RUBY_HEAP_FREE_MIN=100000 | |
export RUBY_HEAP_SLOTS_INCREMENT=300000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=79000000 | |
: ${RAILS_ROOT:=$(dirname $(dirname $0))} | |
: ${RAILS_ENV:=production} | |
export RAILS_ROOT RAILS_ENV | |
cd $RAILS_ROOT | |
exec /usr/local/bin/unicorn_rails -c "$RAILS_ROOT/config/unicorn.rb" -E "$RAILS_ENV" -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment