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
committerThibaut Girka <thib@sitedethib.com>2019-07-16 16:12:01 +0200
commitc8a47595fb4a54af6a50a82bf0dbae4950586264 (patch)
tree182018f733d1d4efb3070fe12a7c69f3d6a99942
parent729723f857d11434c0f78d63fe16537d77f1c77c (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' }