Started inital migration to rails 3.2
This commit is contained in:
19
unicorn.ru
Executable file
19
unicorn.ru
Executable file
@@ -0,0 +1,19 @@
|
||||
working_directory "/opt/horse_forum/forum/"
|
||||
pid "/tmp/horse_forum.pid"
|
||||
|
||||
preload_app true
|
||||
timeout 60
|
||||
worker_processes 4
|
||||
listen "/tmp/horseforum.sock"
|
||||
stderr_path('/opt/horse_forum/unicorn.log')
|
||||
|
||||
GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true
|
||||
|
||||
after_fork do |server, worker|
|
||||
#start the worker on port 4000, 4001, 4002 etc...
|
||||
addr = "0.0.0.0:#{3000 + worker.nr}"
|
||||
# infinite tries to start the worker
|
||||
server.listen(addr, :tries => -1, :delay => -1, :backlog => 128)
|
||||
#Drop privileges if running as root
|
||||
worker.user('nobody', 'nobody') if Process.euid == 0
|
||||
end
|
||||
Reference in New Issue
Block a user