From 5b9c6d39574ca3b40ed05ecb3a382e90cfb3d3c6 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Mon, 16 Sep 2024 15:16:57 +0200 Subject: [PATCH] cleanup puma config comments and configure host to default from HOST and default to 127.0.0.1 --- config/puma.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config/puma.rb b/config/puma.rb index 4fe6d97c7c04..2b9f7a1fcba5 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -7,12 +7,13 @@ threads_max_count = OpenProject::Configuration.web_max_threads threads threads_min_count, [threads_min_count, threads_max_count].max -# Specifies the `port` that Puma will listen on to receive requests; default is 3000. -# +# Specifies the address on which Puma will listen on to receive requests; default is 127.0.0.1. +set_default_host ENV.fetch("HOST") { "127.0.0.1" } + +# Specifies the port that Puma will listen on to receive requests; default is 3000. port ENV.fetch("PORT") { 3000 }.to_i -# Specifies the `environment` that Puma will run in. -# +# Specifies the environment that Puma will run in. environment ENV.fetch("RAILS_ENV") { "development" } # Specifies the number of `workers` to boot in clustered mode.