Skip to content

Commit

Permalink
THREESCALE-4185: Support TLS protected PostgreSQL (#532)
Browse files Browse the repository at this point in the history
* Add env. variables to provide certificates and keys

* Add new var `DATABASE_SSL_MODE` for Postgres
  • Loading branch information
jlledom authored Jul 23, 2024
1 parent 44eeee3 commit 5b08c2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ default: &default
connect_timeout: 5
variables:
statement_timeout: 5000 # ms
sslmode: <%= ENV.fetch('DATABASE_SSL_MODE', ENV.fetch('DATABASE_SSL_CA', nil) ? 'verify-full' : 'disable') %>
sslrootcert: <%= ENV['DATABASE_SSL_CA'] %>
sslcert: <%= ENV['DATABASE_SSL_CERT'] %>
sslkey: <%= ENV['DATABASE_SSL_KEY'] %>

development:
<<: *default
Expand Down

0 comments on commit 5b08c2f

Please sign in to comment.