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:
4
config/environments/custom/development.rb
Normal file
4
config/environments/custom/development.rb
Normal 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
|
||||
4
config/environments/custom/preproduction.rb
Normal file
4
config/environments/custom/preproduction.rb
Normal 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
|
||||
4
config/environments/custom/production.rb
Normal file
4
config/environments/custom/production.rb
Normal 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
|
||||
7
config/environments/custom/staging.rb
Normal file
7
config/environments/custom/staging.rb
Normal 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
|
||||
4
config/environments/custom/test.rb
Normal file
4
config/environments/custom/test.rb
Normal 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
|
||||
@@ -71,3 +71,5 @@ Rails.application.configure do
|
||||
# routes, locales, etc. This feature depends on the listen gem.
|
||||
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||
end
|
||||
|
||||
require Rails.root.join("config", "environments", "custom", "development")
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
require Rails.root.join("config", "environments", "staging")
|
||||
require Rails.root.join("config", "environments", "custom", "preproduction")
|
||||
|
||||
@@ -122,3 +122,5 @@ Rails.application.configure do
|
||||
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||
end
|
||||
|
||||
require Rails.root.join("config", "environments", "custom", "production")
|
||||
|
||||
@@ -121,3 +121,5 @@ Rails.application.configure do
|
||||
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||
end
|
||||
|
||||
require Rails.root.join("config", "environments", "custom", "staging")
|
||||
|
||||
@@ -61,3 +61,5 @@ Rails.application.configure do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require Rails.root.join("config", "environments", "custom", "test")
|
||||
|
||||
Reference in New Issue
Block a user