]> cat aescling's git repositories - mastodon.git/commitdiff
Make puma bind address configurable with BIND env var (#11326)
authorDaigo 3 Dango <zunda@users.noreply.github.com>
Tue, 16 Jul 2019 04:51:36 +0000 (18:51 -1000)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 16 Jul 2019 04:51:36 +0000 (06:51 +0200)
config/puma.rb

index 25a5534b29dcfbb34866dae13b1f88f4c16948cd..6a96867d54d27e04f2090bc4191131da39b8a76c 100644 (file)
@@ -4,7 +4,7 @@ threads threads_count, threads_count
 if ENV['SOCKET']
   bind "unix://#{ENV['SOCKET']}"
 else
-  bind "tcp://127.0.0.1:#{ENV.fetch('PORT', 3000)}"
+  bind "tcp://#{ENV.fetch('BIND', '127.0.0.1')}:#{ENV.fetch('PORT', 3000)}"
 end
 
 environment ENV.fetch('RAILS_ENV') { 'development' }