From: Akihiko Odaki Date: Fri, 21 Apr 2017 23:22:20 +0000 (+0900) Subject: Do not set port for puma if it is bound to unix socket (#2289) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=0f852c6f749dcee61758c4c5ccd94be98f29512c;p=mastodon.git 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. --- diff --git a/config/puma.rb b/config/puma.rb index eb8fc6a8e..0397b8920 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 }