Clean up redis configuration. Allow using REDIS_URL to set advanced (#2732)
connection options instead of setting REDIS_HOST etc individually Close #1986
This commit is contained in:
parent
005f1fd360
commit
c997091166
8 changed files with 53 additions and 61 deletions
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
port = ENV.fetch('PORT') { 3000 }
|
||||
host = ENV.fetch('LOCAL_DOMAIN') { "localhost:#{port}" }
|
||||
port = ENV.fetch('PORT') { 3000 }
|
||||
host = ENV.fetch('LOCAL_DOMAIN') { "localhost:#{port}" }
|
||||
web_host = ENV.fetch('WEB_DOMAIN') { host }
|
||||
https = ENV['LOCAL_HTTPS'] == 'true'
|
||||
https = ENV['LOCAL_HTTPS'] == 'true'
|
||||
|
||||
Rails.application.configure do
|
||||
config.x.local_domain = host
|
||||
|
@ -15,7 +15,6 @@ Rails.application.configure do
|
|||
config.x.streaming_api_base_url = 'http://localhost:4000'
|
||||
|
||||
if Rails.env.production?
|
||||
config.action_cable.allowed_request_origins = ["http#{https ? 's' : ''}://#{web_host}"]
|
||||
config.x.streaming_api_base_url = ENV.fetch('STREAMING_API_BASE_URL') { "http#{https ? 's' : ''}://#{web_host}" }
|
||||
config.x.streaming_api_base_url = ENV.fetch('STREAMING_API_BASE_URL') { "http#{https ? 's' : ''}://#{web_host}" }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue