From 65ed6bc3b4d166658ad3d2e233132fcdec2cd306 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Mon, 16 Sep 2024 16:39:24 +0200 Subject: [PATCH] host_name default has to use a proc, apparently file is read before dotenv-rails changes environment --- config/constants/settings/definition.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rb index a5e4a46e5395..715707dd6b73 100644 --- a/config/constants/settings/definition.rb +++ b/config/constants/settings/definition.rb @@ -537,7 +537,7 @@ class Definition }, host_name: { format: :string, - default: "#{ENV.fetch('HOST', 'localhost')}:#{ENV.fetch('PORT', 3000)}", + default: -> { "#{ENV.fetch('HOST', 'localhost')}:#{ENV.fetch('PORT', 3000)}" }, default_by_env: { # We do not want to set a localhost host name in production production: nil