From c8d11789184a85ac160887d9d2f3cf32ce4bf7a2 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Fri, 17 Jul 2020 09:05:19 +0100 Subject: [PATCH] support for environment variable for puma PORT --- config/puma.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index a16ab4c..44b1e32 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,7 +2,7 @@ require_relative '../lib/postal/config' threads_count = Postal.config.web_server&.max_threads&.to_i || 5 threads threads_count, threads_count bind_address = Postal.config.web_server&.bind_address || '127.0.0.1' -bind_port = Postal.config.web_server&.port&.to_i || 5000 +bind_port = ENV['PORT'] || Postal.config.web_server&.port&.to_i || 5000 bind "tcp://#{bind_address}:#{bind_port}" environment Postal.config.rails&.environment || 'development' prune_bundler