All checks were successful
continuous-integration/drone/push Build is passing
Move the various sections to their own concerns, so they're easier to find and maintain
35 lines
830 B
Ruby
35 lines
830 B
Ruby
module Settings
|
|
module GeneralSettings
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
field :primary_domain, type: :string,
|
|
default: ENV["PRIMARY_DOMAIN"].presence
|
|
|
|
field :accounts_domain, type: :string,
|
|
default: ENV["AKKOUNTS_DOMAIN"].presence
|
|
|
|
#
|
|
# Internal services
|
|
#
|
|
|
|
field :redis_url, type: :string,
|
|
default: ENV["REDIS_URL"] || "redis://localhost:6379/0"
|
|
|
|
field :s3_enabled, type: :boolean,
|
|
default: ENV["S3_ENABLED"] && ENV["S3_ENABLED"].to_s != "false"
|
|
|
|
field :sentry_enabled, type: :boolean, readonly: true,
|
|
default: ENV["SENTRY_DSN"].present?
|
|
|
|
#
|
|
# Registrations
|
|
#
|
|
|
|
field :reserved_usernames, type: :array, default: %w[
|
|
account accounts donations mail webmaster support
|
|
]
|
|
end
|
|
end
|
|
end
|