host_name default has to use a proc, apparently file is read before dotenv-rails changes environment

This commit is contained in:
Ivan Kuchin
2024-09-16 16:39:24 +02:00
parent 86b16d19f3
commit 65ed6bc3b4
+1 -1
View File
@@ -537,7 +537,7 @@ module Settings
},
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