Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

default host_name setting to environment variables instead of hardcoded localhost:3000

Ivan Kuchinfe3110561d1a
diff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rb
index e2bf418d966..a5e4a46e539 100644
--- a/config/constants/settings/definition.rb
+++ b/config/constants/settings/definition.rb
@@ -537,7 +537,7 @@ module Settings
},
host_name: {
format: :string,
- default: "localhost: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