Skip to content

Commit

Permalink
Build(deps): Bump postgrex from 0.17.5 to 0.18.0 #306: adjust config …
Browse files Browse the repository at this point in the history
…to new format
  • Loading branch information
nwittstruck committed Jun 14, 2024
1 parent 9012c5e commit 7e8cd4d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ if config_env() != :test do
# disable on prod, because logger_json will take care of this. set to :debug for test and dev
ecto_log_level = if config_env() == :prod, do: false, else: :debug

ssl_config =
if System.get_env("DATABASE_SSL", "true") == "true",
do: [cacerts: :public_key.cacerts_get()],
else: nil

config :mindwendel, Mindwendel.Repo,
start_apps_before_migration: [:logger_json],
database: System.get_env("DATABASE_NAME"),
Expand All @@ -60,15 +65,7 @@ if config_env() != :test do
url: System.get_env("DATABASE_URL"),
timeout: String.to_integer(System.get_env("DATABASE_TIMEOUT", "15000")),
log: ecto_log_level,
ssl: System.get_env("DATABASE_SSL", "true") == "true",
ssl_opts: [
verify: :verify_peer,
cacerts: :public_key.cacerts_get(),
server_name_indication: String.to_charlist(System.get_env("DATABASE_HOST")),
customize_hostname_check: [
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
]
]
ssl: ssl_config

secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
Expand Down

0 comments on commit 7e8cd4d

Please sign in to comment.