Skip to content

Instantly share code, notes, and snippets.

@YazzyYaz YazzyYaz/prod.exs
Created Oct 24, 2019

What would you like to do?
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
|> String.split(".")
|> List.last()
|> String.downcase()
# 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
You can’t perform that action at this time.