Make Redis URL configurable
This commit is contained in:
parent
42b9b27561
commit
6b7a80e23a
@ -7,6 +7,8 @@ SMTP_DOMAIN=example.com
|
|||||||
SMTP_AUTH_METHOD=plain
|
SMTP_AUTH_METHOD=plain
|
||||||
SMTP_ENABLE_STARTTLS=auto
|
SMTP_ENABLE_STARTTLS=auto
|
||||||
|
|
||||||
|
REDIS_URL='redis://localhost:6379/1'
|
||||||
|
|
||||||
LDAP_HOST=localhost
|
LDAP_HOST=localhost
|
||||||
LDAP_PORT=389
|
LDAP_PORT=389
|
||||||
LDAP_ADMIN_PASSWORD=passthebutter
|
LDAP_ADMIN_PASSWORD=passthebutter
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
class Setting < RailsSettings::Base
|
class Setting < RailsSettings::Base
|
||||||
cache_prefix { "v1" }
|
cache_prefix { "v1" }
|
||||||
|
|
||||||
|
#
|
||||||
|
# Internal services
|
||||||
|
#
|
||||||
|
|
||||||
|
field :redis_url, type: :string, readonly: true,
|
||||||
|
default: ENV["REDIS_URL"] || "redis://localhost:6379/0"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Registrations
|
# Registrations
|
||||||
#
|
#
|
||||||
|
5
config/initializers/sidekiq.rb
Normal file
5
config/initializers/sidekiq.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
require_relative "../../app/models/setting"
|
||||||
|
|
||||||
|
Sidekiq.configure_server do |config|
|
||||||
|
config.redis = { url: Setting.redis_url }
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user