config: allow specifying location of Danbooru config file.
Allow specifying the location of the `config/danbooru_local_config.rb`
file with the DANBOORU_CONFIG_FILE environment variable. For example:
DANBOORU_CONFIG_FILE=/etc/danbooru/danbooru_local_config.rb bin/rails server
This is useful in Kubernetes because it lets us mount a directory
containing the config file without it clobbering everything else in the
config/ directory.
This commit is contained in:
@@ -16,7 +16,7 @@ Bundler.require(*Rails.groups)
|
||||
|
||||
begin
|
||||
require_relative "danbooru_default_config"
|
||||
require_relative "danbooru_local_config"
|
||||
require_relative ENV.fetch("DANBOORU_CONFIG_FILE", "danbooru_local_config")
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user