Skip to content

Commit

Permalink
feat: proxy sslmode parameter to Sequel
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankZZ authored Dec 4, 2019
1 parent af2faae commit d681a38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pact_broker/database_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

def create_database_connection(logger)
database_adapter = ENV.fetch('PACT_BROKER_DATABASE_ADAPTER','') != '' ? ENV['PACT_BROKER_DATABASE_ADAPTER'] : 'postgres'

sslmode = ENV.fetch('PACT_BROKER_DATABASE_SSLMODE','') != '' ? ENV['PACT_BROKER_DATABASE_SSLMODE'] : 'prefer'
config = {
adapter: database_adapter,
user: ENV['PACT_BROKER_DATABASE_USERNAME'],
password: ENV['PACT_BROKER_DATABASE_PASSWORD'],
host: ENV['PACT_BROKER_DATABASE_HOST'],
database: ENV['PACT_BROKER_DATABASE_NAME'],
sslmode: sslmode,
encoding: 'utf8'
}

Expand Down

0 comments on commit d681a38

Please sign in to comment.