|
|
@ -46,11 +46,10 @@ database_api_url = |
|
|
|
do: System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
do: System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
else: System.get_env("DATABASE_URL") |
|
|
|
else: System.get_env("DATABASE_URL") |
|
|
|
|
|
|
|
|
|
|
|
# pool_size = |
|
|
|
pool_size = |
|
|
|
# if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
# do: String.to_integer(System.get_env("POOL_SIZE", "40")), |
|
|
|
do: String.to_integer(System.get_env("POOL_SIZE", "30")), |
|
|
|
# else: String.to_integer(System.get_env("POOL_SIZE", "50")) |
|
|
|
else: String.to_integer(System.get_env("POOL_SIZE", "40")) |
|
|
|
pool_size = String.to_integer(System.get_env("POOL_SIZE", "30")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Configure your database |
|
|
|
# Configure your database |
|
|
|
config :explorer, Explorer.Repo, |
|
|
|
config :explorer, Explorer.Repo, |
|
|
@ -62,10 +61,7 @@ config :explorer, Explorer.Repo, |
|
|
|
database_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: database |
|
|
|
database_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: database |
|
|
|
hostname_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: hostname |
|
|
|
hostname_api = if System.get_env("DATABASE_READ_ONLY_API_URL"), do: nil, else: hostname |
|
|
|
|
|
|
|
|
|
|
|
pool_size_api = |
|
|
|
pool_size_api = String.to_integer(System.get_env("POOL_SIZE_API", "10")) |
|
|
|
if System.get_env("DATABASE_READ_ONLY_API_URL"), |
|
|
|
|
|
|
|
do: String.to_integer(System.get_env("POOL_SIZE_API", "10")), |
|
|
|
|
|
|
|
else: String.to_integer(System.get_env("POOL_SIZE_API", "10")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Configure API database |
|
|
|
# Configure API database |
|
|
|
config :explorer, Explorer.Repo.Replica1, |
|
|
|
config :explorer, Explorer.Repo.Replica1, |
|
|
@ -76,10 +72,7 @@ config :explorer, Explorer.Repo.Replica1, |
|
|
|
|
|
|
|
|
|
|
|
database_account_url = System.get_env("ACCOUNT_DATABASE_URL") || System.get_env("DATABASE_URL") |
|
|
|
database_account_url = System.get_env("ACCOUNT_DATABASE_URL") || System.get_env("DATABASE_URL") |
|
|
|
|
|
|
|
|
|
|
|
pool_size_account = |
|
|
|
pool_size_account = String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) |
|
|
|
if System.get_env("ACCOUNT_DATABASE_URL"), |
|
|
|
|
|
|
|
do: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")), |
|
|
|
|
|
|
|
else: String.to_integer(System.get_env("ACCOUNT_POOL_SIZE", "10")) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
database_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: database |
|
|
|
database_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: database |
|
|
|
hostname_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: hostname |
|
|
|
hostname_account = if System.get_env("ACCOUNT_DATABASE_URL"), do: nil, else: hostname |
|
|
|