Allow adding per-environment custom settings

Until now, when editing a specific environment, other CONSUL
installations had to edit the original file, which made it harder to
upgrade.

Now it's possible to change the default CONSUL settings using custom
files, making it easier to upgrade to versions of CONSUL which change
the original environment files (which is very common when upgrading
versions of Rails).
This commit is contained in:
Javi Martín
2022-09-29 02:43:31 +02:00
parent 3e726357eb
commit b7e116b53f
10 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
Rails.application.configure do
# Overwrite settings for the development environment or add your own
# custom settings for this environment.
end

View File

@@ -0,0 +1,4 @@
Rails.application.configure do
# Overwrite settings for the preproduction environment or add your own
# custom settings for this environment.
end

View File

@@ -0,0 +1,4 @@
Rails.application.configure do
# Overwrite settings for the production environment or add your own
# custom settings for this environment.
end

View File

@@ -0,0 +1,7 @@
Rails.application.configure do
# Overwrite settings for the staging environment or add your own
# custom settings for this environment. Note these changes will
# also affect the preproduction environment, so edit the
# `config/environments/custom/preproduction.rb` file if you don't
# want these changes to be applied there as well.
end

View File

@@ -0,0 +1,4 @@
Rails.application.configure do
# Overwrite settings for the test environment or add your own
# custom settings for this environment.
end

View File

@@ -71,3 +71,5 @@ Rails.application.configure do
# routes, locales, etc. This feature depends on the listen gem. # routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end end
require Rails.root.join("config", "environments", "custom", "development")

View File

@@ -1 +1,2 @@
require Rails.root.join("config", "environments", "staging") require Rails.root.join("config", "environments", "staging")
require Rails.root.join("config", "environments", "custom", "preproduction")

View File

@@ -122,3 +122,5 @@ Rails.application.configure do
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
end end
require Rails.root.join("config", "environments", "custom", "production")

View File

@@ -121,3 +121,5 @@ Rails.application.configure do
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
end end
require Rails.root.join("config", "environments", "custom", "staging")

View File

@@ -61,3 +61,5 @@ Rails.application.configure do
end end
end end
end end
require Rails.root.join("config", "environments", "custom", "test")