We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7594870 commit 4bbd90cCopy full SHA for 4bbd90c
1 file changed
config/application.rb
@@ -28,12 +28,11 @@ class Application < Rails::Application
28
config.i18n.default_locale = :nl
29
config.i18n.fallbacks = [:nl]
30
31
+ # Build Redis URL from environment variables
32
redis_url = ENV['REDIS_URL']
- redis_url ||= begin
33
- cable_cfg = Rails.application.config_for(:cable)
34
- cable_cfg['url'] if cable_cfg.present?
35
- rescue StandardError
36
- nil
+ if redis_url.blank? && ENV['REDIS_HOST'].present?
+ password = ENV['REDIS_PASSWORD'].present? ? ":#{ENV['REDIS_PASSWORD']}@" : ':'
+ redis_url = "redis://#{password}#{ENV['REDIS_HOST']}:#{ENV.fetch('REDIS_PORT', 6379)}/1"
37
end
38
39
if redis_url.present?
0 commit comments