about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaigo 3 Dango <zunda@users.noreply.github.com>2019-07-15 18:51:36 -1000
committerEugen Rochko <eugen@zeonfederated.com>2019-07-16 06:51:36 +0200
commitb4c9a860e5c349a9abdfbdc9b76f338e70fc89cc (patch)
treedf993a4fe0bb47ce6d82c1bd816d5720511e8b0d
parent9b1d3e4acb8190509d98ee4ef2ab9b24b45362ee (diff)
Make puma bind address configurable with BIND env var (#11326)
-rw-r--r--config/puma.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/puma.rb b/config/puma.rb
index 25a5534b2..6a96867d5 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -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' }