Skip to content

Instantly share code, notes, and snippets.

@ilyabrin
Created July 17, 2015 13:28
Show Gist options
  • Select an option

  • Save ilyabrin/27516b55f5852146cda2 to your computer and use it in GitHub Desktop.

Select an option

Save ilyabrin/27516b55f5852146cda2 to your computer and use it in GitHub Desktop.
Template for Ruby on Rails + Unicorn appname/config/unicorn.rb
# set path to application
app_dir = File.expand_path("../..", __FILE__)
shared_dir = "#{app_dir}/shared"
working_directory app_dir
# Set unicorn options
worker_processes 2
preload_app true
timeout 30
# Set up socket location
listen "#{shared_dir}/sockets/unicorn.sock", :backlog => 64
# Logging
stderr_path "#{shared_dir}/log/unicorn.stderr.log"
stdout_path "#{shared_dir}/log/unicorn.stdout.log"
# Set master PID location
pid "#{shared_dir}/pids/unicorn.pid"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment