Permalink
Browse files

Use puma

  • Loading branch information...
sorah committed Oct 31, 2015
1 parent 7b6a4c1 commit 900ed867d815879af9e9d7ab33992acabd91564d
Showing with 26 additions and 3 deletions.
  1. +24 −3 5f/config/nginx.conf
  2. +2 −0 5f/webapp/ruby/reload.sh
View
@@ -8,16 +8,22 @@ events {
http {
upstream isu12 {
- server isu12a:8081;
- server isu12b:8081;
- server isu12c:8081;
+ server isu12a:8082;
+ server isu12b:8082;
+ server isu12c:8082;
keepalive 36;
}
upstream unicorn {
server unix:/tmp/unicorn.sock;
}
+ upstream puma {
+ server unix:/tmp/puma.sock;
+ }
+
+
+
log_format ltsv "status:$status"
"\ttime:$time_iso8601"
"\treqtime:$request_time"
@@ -87,4 +93,19 @@ http {
proxy_pass http://unicorn;
}
}
+
+ server {
+ listen 8082;
+
+ location ~ ^/(js|css|fonts)/ {
+ root /home/isucon/shirokanezoo/5f/webapp/static;
+ expires max;
+ }
+
+ location / {
+ proxy_set_header Host $host;
+ proxy_pass http://puma;
+ }
+ }
+
}
View
@@ -6,4 +6,6 @@ bundle install --jobs 30
ruby extconf.rb
make
)
+set +e
kill -USR2 $(cat /home/isucon/webapp/ruby/unicorn.pid)
+kill -USR2 $(cat /home/isucon/webapp/ruby/puma.pid)

0 comments on commit 900ed86

Please sign in to comment.