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