Started inital migration to rails 3.2

This commit is contained in:
2013-01-19 01:14:55 -05:00
parent 64aff15deb
commit a9a4cd892f
98 changed files with 968 additions and 363 deletions

19
unicorn.ru Executable file
View 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