diff options
author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2017-04-22 08:22:20 +0900 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-22 01:22:20 +0200 |
commit | 0f852c6f749dcee61758c4c5ccd94be98f29512c (patch) | |
tree | 49825e80c19efac4ad04cf169bea9c4a666ecf39 | |
parent | 974ac467de5a60a30dc3d19b8ced732e04395879 (diff) |
Do not set port for puma if it is bound to unix socket (#2289)
Setting port after binding a unix socket puma listen to both of an unix
socket and TCP/IP, which is not a desired behavior.
-rw-r--r-- | config/puma.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/puma.rb b/config/puma.rb index eb8fc6a8e9b..0397b892048 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -3,9 +3,10 @@ threads threads_count, threads_count if ENV['SOCKET'] then bind 'unix://' + ENV['SOCKET'] +else + port ENV.fetch('PORT') { 3000 } end -port ENV.fetch('PORT') { 3000 } environment ENV.fetch('RAILS_ENV') { 'development' } workers ENV.fetch('WEB_CONCURRENCY') { 2 } |