From c56a088ad987bd8f0cbc2c231b9f8b1cd0105ebf Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 13 Dec 2021 10:29:28 +0100 Subject: [PATCH] Improve database and Okta config [SCI-6184] --- config/database.yml | 4 ++-- config/initializers/devise.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/database.yml b/config/database.yml index f19ef1c46..b76585f21 100644 --- a/config/database.yml +++ b/config/database.yml @@ -17,8 +17,8 @@ default: &default adapter: postgresql encoding: unicode - database: postgres pool: <%= ENV['DB_POOL'] || ENV['RAILS_MAX_THREADS'] || 5 %> + url: <%= ENV['DATABASE_URL'] %> # For details on connection pooling, see rails configuration guide # http://guides.rubyonrails.org/configuring.html#database-pooling @@ -80,7 +80,7 @@ test: &test # url: <%= ENV['DATABASE_URL'] %> # production: - url: <%= ENV['DATABASE_URL'] %> + <<: *default cucumber: <<: *test diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 4ffc10175..e7d8c83ea 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -295,7 +295,7 @@ Devise.setup do |config| config.omniauth :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], scope: 'r_liteprofile r_emailaddress' end - if [ENV['OKTA_CLIENT_ID'], ENV['OKTA_CLIENT_SECRET'], ENV['OKTA_DOMAIN'], ENV['OKTA_AUTH_SERVER_ID']].all? + if [ENV['OKTA_CLIENT_ID'], ENV['OKTA_CLIENT_SECRET'], ENV['OKTA_DOMAIN'], ENV['OKTA_AUTH_SERVER_ID']].all?(&:present?) config.omniauth( :okta, ENV['OKTA_CLIENT_ID'],