Skip to content

Commit e4122c4

Browse files
authored
fix(releases): more postgres SSL options (#408)
1 parent 683188c commit e4122c4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

config/releases.exs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,16 @@ config :db, DB.Repo,
7474
username: load_secret.("db_username"),
7575
password: load_secret.("db_password"),
7676
database: load_secret.("db_name"),
77+
pool_size: load_int.({"db_pool_size", 10}),
78+
socket_options: if load_bool.({"db_ssl", "false"}), do: [:inet6], else: [],
7779
ssl: load_bool.({"db_ssl", "false"}),
7880
ssl_opts: [
79-
server_name_indication: to_charlist(load_secret.("db_hostname"))
81+
server_name_indication: to_charlist(load_secret.("db_hostname")),
82+
verify: :verify_peer,
83+
customize_hostname_check: [
84+
# Our hosting provider uses a wildcard certificate. By default, Erlang does not support wildcard certificates.
85+
match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
86+
]
8087
]
8188

8289
config :ex_aws,

0 commit comments

Comments
 (0)