Skip to content

Instantly share code, notes, and snippets.

@caok
Created May 2, 2015 09:11
Show Gist options
  • Save caok/b06b05a0e5d838844954 to your computer and use it in GitHub Desktop.
Save caok/b06b05a0e5d838844954 to your computer and use it in GitHub Desktop.
unicorn
rbenv sudo unicorn_rails -c config/unicorn1.rb -D -E production
ps aux | grep unicorn | awk '{print $2}' | sudo xargs kill -s 9
RAILS_ROOT = File.expand_path("../..", __FILE__)
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 240
preload_app true
listen 80, :tcp_nopush => false
listen "#{RAILS_ROOT}/tmp/sockets/union.socket"
pid "#{RAILS_ROOT}/tmp/pids/unicorn.pid"
stderr_path "#{RAILS_ROOT}/log/unicorn.err.log"
stdout_path "#{RAILS_ROOT}/log/unicorn.out.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment