Skip to content

Instantly share code, notes, and snippets.

@YazzyYaz
Created October 24, 2019 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YazzyYaz/fb157daa94a57b35c9b288abc8ec425e to your computer and use it in GitHub Desktop.
Save YazzyYaz/fb157daa94a57b35c9b288abc8ec425e to your computer and use it in GitHub Desktop.
Prod.exs for Blockscout
use Mix.Config
# Configures the database
config :explorer, Explorer.Repo,
url: System.get_env("DATABASE_URL"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
ssl: String.equivalent?(System.get_env("ECTO_USE_SSL") || "true", "true"),
prepare: :unnamed,
timeout: :timer.seconds(60),
queue_target: 5000,
queue_interval: 100
config :explorer, Explorer.Tracer, env: "production", disabled?: true
config :logger, :explorer,
level: :info,
path: Path.absname("logs/prod/explorer.log"),
rotate: %{max_bytes: 52_428_800, keep: 19}
config :logger, :reading_token_functions,
level: :debug,
path: Path.absname("logs/prod/explorer/tokens/reading_functions.log"),
metadata_filter: [fetcher: :token_functions],
rotate: %{max_bytes: 52_428_800, keep: 19}
config :logger, :token_instances,
level: :debug,
path: Path.absname("logs/prod/explorer/tokens/token_instances.log"),
metadata_filter: [fetcher: :token_instances],
rotate: %{max_bytes: 52_428_800, keep: 19}
variant =
if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do
"parity"
else
System.get_env("ETHEREUM_JSONRPC_VARIANT")
|> String.split(".")
|> List.last()
|> String.downcase()
end
# Import variant specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "prod/#{variant}.exs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment