From b4a3748de439e888b11eb6fb16eff888ec0321a2 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Mon, 12 Sep 2022 19:09:48 +0300 Subject: [PATCH] ACCOUNT_DATABASE_URL from DATABASE_URL if not provided --- config/runtime/prod.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/runtime/prod.exs b/config/runtime/prod.exs index 2b15151aab..0e4e58f81a 100644 --- a/config/runtime/prod.exs +++ b/config/runtime/prod.exs @@ -49,7 +49,11 @@ config :explorer, Explorer.Repo.Replica1, pool_size: pool_size_api, ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true") -database_account_url = System.get_env("ACCOUNT_DATABASE_URL") +database_account_url = + if System.get_env("ACCOUNT_DATABASE_URL"), + do: System.get_env("ACCOUNT_DATABASE_URL"), + else: System.get_env("DATABASE_URL") + pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "50")) # Configures Account database