Make puma bind address configurable with BIND env var (#11326)

master
Daigo 3 Dango 5 years ago committed by Thibaut Girka
parent 729723f857
commit c8a47595fb
  1. 2
      config/puma.rb

@ -4,7 +4,7 @@ threads threads_count, threads_count
if ENV['SOCKET'] if ENV['SOCKET']
bind "unix://#{ENV['SOCKET']}" bind "unix://#{ENV['SOCKET']}"
else 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 end
environment ENV.fetch('RAILS_ENV') { 'development' } environment ENV.fetch('RAILS_ENV') { 'development' }

Loading…
Cancel
Save