|
|
|
@ -42,12 +42,15 @@ pool_size = |
|
|
|
|
do: ConfigHelper.parse_integer_env_var("POOL_SIZE", 30), |
|
|
|
|
else: ConfigHelper.parse_integer_env_var("POOL_SIZE", 40) |
|
|
|
|
|
|
|
|
|
queue_target = ConfigHelper.parse_integer_env_var("DATABASE_QUEUE_TARGET", 50) |
|
|
|
|
|
|
|
|
|
# Configure your database |
|
|
|
|
config :explorer, Explorer.Repo, |
|
|
|
|
database: database, |
|
|
|
|
hostname: hostname, |
|
|
|
|
url: System.get_env("DATABASE_URL"), |
|
|
|
|
pool_size: pool_size |
|
|
|
|
pool_size: pool_size, |
|
|
|
|
queue_target: queue_target |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
@ -57,7 +60,8 @@ config :explorer, Explorer.Repo.Replica1, |
|
|
|
|
database: database_api, |
|
|
|
|
hostname: hostname_api, |
|
|
|
|
url: ExplorerConfigHelper.get_api_db_url(), |
|
|
|
|
pool_size: ConfigHelper.parse_integer_env_var("POOL_SIZE_API", 10) |
|
|
|
|
pool_size: ConfigHelper.parse_integer_env_var("POOL_SIZE_API", 10), |
|
|
|
|
queue_target: queue_target |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
@ -67,7 +71,8 @@ config :explorer, Explorer.Repo.Account, |
|
|
|
|
database: database_account, |
|
|
|
|
hostname: hostname_account, |
|
|
|
|
url: ExplorerConfigHelper.get_account_db_url(), |
|
|
|
|
pool_size: ConfigHelper.parse_integer_env_var("ACCOUNT_POOL_SIZE", 10) |
|
|
|
|
pool_size: ConfigHelper.parse_integer_env_var("ACCOUNT_POOL_SIZE", 10), |
|
|
|
|
queue_target: queue_target |
|
|
|
|
|
|
|
|
|
# Configure PolygonEdge database |
|
|
|
|
config :explorer, Explorer.Repo.PolygonEdge, |
|
|
|
|