Skip to content

Commit

Permalink
fix TLS config in config/config
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Jun 1, 2021
1 parent cd3cb68 commit 38e75d5
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import Config

host = System.get_env("EVENTSTORE_HOST") || "localhost"
case System.get_env("EVENTSTORE_HOST") do
nil ->
config :volley, Volley.SpearClient,
connection_string: "esdb://admin:changeit@localhost:2113?tls=true",
mint_opts: [
transport_opts: [
cacertfile: Path.join([__DIR__ | ~w[.. certs ca ca.crt]])
]
]

config :volley, Volley.SpearClient,
connection_string: "esdb://admin:changeit@#{host}:2113"
host ->
config :volley, Volley.SpearClient,
connection_string: "esdb://admin:changeit@#{host}:2113"
end

0 comments on commit 38e75d5

Please sign in to comment.