Ecto - support IPv6 connections (#307)

This commit is contained in:
Oliver Kriska 2022-08-29 16:29:54 +02:00 committed by GitHub
parent 71b11cddde
commit 6d6d42fc10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,10 +43,13 @@ else
static_url: static_url
end
ecto_ipv6? = System.get_env("ECTO_IPV6") == "true"
config :accent, Accent.Repo,
pool_size: Utilities.string_to_integer(System.get_env("DATABASE_POOL_SIZE")),
ssl: Utilities.string_to_boolean(System.get_env("DATABASE_SSL")),
url: System.get_env("DATABASE_URL") || "postgres://localhost/accent_development"
url: System.get_env("DATABASE_URL") || "postgres://localhost/accent_development",
socket_options: if(ecto_ipv6?, do: [:inet6], else: [])
google_translate_provider = {Accent.MachineTranslations.Adapter.GoogleTranslations, [key: System.get_env("GOOGLE_TRANSLATIONS_SERVICE_ACCOUNT_KEY")]}