# This file is responsible for configuring your application # and its dependencies with the aid of the Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. import Config # General application configuration config :block_scout_web, namespace: BlockScoutWeb, ecto_repos: [Explorer.Repo] config :block_scout_web, admin_panel_enabled: System.get_env("ADMIN_PANEL_ENABLED", "") == "true" config :block_scout_web, BlockScoutWeb.Counters.BlocksIndexedCounter, enabled: true # Configures the endpoint config :block_scout_web, BlockScoutWeb.Endpoint, url: [ path: System.get_env("NETWORK_PATH") || "/", api_path: System.get_env("API_PATH") || "/" ], render_errors: [view: BlockScoutWeb.ErrorView, accepts: ~w(html json)], pubsub_server: BlockScoutWeb.PubSub config :block_scout_web, BlockScoutWeb.Tracer, service: :block_scout_web, adapter: SpandexDatadog.Adapter, trace_key: :blockscout # Configures gettext config :block_scout_web, BlockScoutWeb.Gettext, locales: ~w(en), default_locale: "en" config :block_scout_web, BlockScoutWeb.SocialMedia, twitter: "PoaNetwork", telegram: "poa_network", facebook: "PoaNetwork", instagram: "PoaNetwork" config :block_scout_web, BlockScoutWeb.Chain.TransactionHistoryChartController, # days history_size: 30 config :ex_cldr, default_locale: "en", default_backend: BlockScoutWeb.Cldr config :logger, :block_scout_web, # keep synced with `config/config.exs` format: "$dateT$time $metadata[$level] $message\n", metadata: ~w(application fetcher request_id first_block_number last_block_number missing_block_range_count missing_block_count block_number step count error_count shrunk import_id transaction_id)a, metadata_filter: [application: :block_scout_web] config :prometheus, BlockScoutWeb.Prometheus.Instrumenter, # override default for Phoenix 1.4 compatibility # * `:transport_name` to `:transport` # * remove `:vsn` channel_join_labels: [:channel, :topic, :transport], # override default for Phoenix 1.4 compatibility # * `:transport_name` to `:transport` # * remove `:vsn` channel_receive_labels: [:channel, :topic, :transport, :event] config :spandex_phoenix, tracer: BlockScoutWeb.Tracer config :wobserver, # return only the local node discovery: :none, mode: :plug config :block_scout_web, BlockScoutWeb.ApiRouter, writing_enabled: System.get_env("DISABLE_WRITE_API") != "true", reading_enabled: System.get_env("DISABLE_READ_API") != "true", wobserver_enabled: System.get_env("WOBSERVER_ENABLED") == "true" config :block_scout_web, BlockScoutWeb.WebRouter, enabled: System.get_env("DISABLE_WEBAPP") != "true" # Configures Ueberauth's Auth0 auth provider config :ueberauth, Ueberauth.Strategy.Auth0.OAuth, domain: System.get_env("AUTH0_DOMAIN"), client_id: System.get_env("AUTH0_CLIENT_ID"), client_secret: System.get_env("AUTH0_CLIENT_SECRET") # Configures Ueberauth local settings config :ueberauth, Ueberauth, providers: [ auth0_api: { Ueberauth.Strategy.Auth0, [callback_url: System.get_env("AUTH0_CALLBACK_API_URL"), callback_path: System.get_env("AUTH0_CALLBACK_API_PATH")] }, auth0: { Ueberauth.Strategy.Auth0, [callback_url: System.get_env("AUTH0_CALLBACK_URL")] } ], logout_url: System.get_env("AUTH0_LOGOUT_URL"), logout_return_to_url: System.get_env("AUTH0_LOGOUT_RETURN_URL") config :hammer, backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} config :block_scout_web, BlockScoutWeb.Guardian, issuer: "block_scout_web", secret_key: System.get_env("SECRET_KEY_GUARDIAN") # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{config_env()}.exs"