Skip to content

Instantly share code, notes, and snippets.

@Adrian2112
Created January 29, 2014 23:01
Show Gist options
  • Save Adrian2112/8699076 to your computer and use it in GitHub Desktop.
Save Adrian2112/8699076 to your computer and use it in GitHub Desktop.
Unicorn configuration to run processes
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
worker_processes 3 # amount of unicorn workers to spin up
timeout 30 # restarts workers that hang for 30 seconds
@worker = nil
before_fork do |server, worker|
@worker ||= spawn("bundle exec rake jobs:work")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment