Allow to connect to Postgres via IPv6 (#1006)

This commit is contained in:
Adrian Kumpf
2020-11-05 12:20:09 +01:00
committed by GitHub
parent b58abe3085
commit e0b3d3d6b5
2 changed files with 5 additions and 0 deletions

View File

@@ -80,6 +80,10 @@ config :teslamate, TeslaMate.Repo,
pool_size: System.get_env("DATABASE_POOL_SIZE", "10") |> String.to_integer(),
timeout: System.get_env("DATABASE_TIMEOUT", "60000") |> String.to_integer()
if System.get_env("DATABASE_IPV6") == "true" do
config :teslamate, TeslaMate.Repo, socket_options: [:inet6]
end
config :teslamate, TeslaMateWeb.Endpoint,
http:
Util.choose_http_binding_address() ++