From 60374779e2b9da580bfc93f0e8aedc21e667e7d2 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 24 Feb 2020 13:23:29 +0300 Subject: [PATCH] Refine dev config --- CHANGELOG.md | 1 + apps/block_scout_web/README.md | 7 +++---- apps/block_scout_web/config/dev.exs | 4 ++-- apps/block_scout_web/config/dev.secret.exs.example | 5 ----- apps/explorer/README.md | 7 +++---- apps/explorer/config/dev.exs | 7 ++----- apps/explorer/config/dev.secret.exs.example | 10 ---------- 7 files changed, 11 insertions(+), 30 deletions(-) delete mode 100644 apps/block_scout_web/config/dev.secret.exs.example delete mode 100644 apps/explorer/config/dev.secret.exs.example diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a66e51a3d..6b087d63d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#2834](https://github.com/poanetwork/blockscout/pull/2834) - always redirect to checksummed hash ### Fixes +- [#3021](https://github.com/poanetwork/blockscout/pull/3021) - Refine dev config - [#3016](https://github.com/poanetwork/blockscout/pull/3016), [#3017](https://github.com/poanetwork/blockscout/pull/3017) - Fix token instance QR code data - [#3014](https://github.com/poanetwork/blockscout/pull/3014) - Fix checksum address feature for tokens pages - [#3012](https://github.com/poanetwork/blockscout/pull/3012) - Speedup token transfers list query diff --git a/apps/block_scout_web/README.md b/apps/block_scout_web/README.md index e24cbc6487..6d0ae03073 100644 --- a/apps/block_scout_web/README.md +++ b/apps/block_scout_web/README.md @@ -4,9 +4,9 @@ This is a tool for inspecting and analyzing the POA Network blockchain from a we ## Machine Requirements -* Erlang/OTP 20.2+ -* Elixir 1.5+ -* Postgres 10.0 +* Erlang/OTP 21+ +* Elixir 1.9+ +* Postgres 10.3 ## Required Accounts @@ -21,7 +21,6 @@ This is a tool for inspecting and analyzing the POA Network blockchain from a we To get BlockScout Web interface up and running locally: * Setup `../explorer` - * Set up some default configuration with: `$ cp config/dev.secret.exs.example config/dev.secret.exs` * Install Node.js dependencies with `$ cd assets && npm install && cd ..` * Start Phoenix with `$ mix phx.server` (This can be run from this directory or the project root: the project root is recommended.) diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index fa1e25341d..b841d8efe1 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -15,6 +15,8 @@ port = end config :block_scout_web, BlockScoutWeb.Endpoint, + secret_key_base: + System.get_env("SECRET_KEY_BASE") || "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5", http: [ port: port || 4000 ], @@ -79,5 +81,3 @@ config :logger, :block_scout_web, # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. config :phoenix, :stacktrace_depth, 20 - -import_config "dev.secret.exs" diff --git a/apps/block_scout_web/config/dev.secret.exs.example b/apps/block_scout_web/config/dev.secret.exs.example deleted file mode 100644 index 3c358188f2..0000000000 --- a/apps/block_scout_web/config/dev.secret.exs.example +++ /dev/null @@ -1,5 +0,0 @@ -use Mix.Config - -# Configures the endpoint -config :block_scout_web, BlockScoutWeb.Endpoint, - secret_key_base: "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5" diff --git a/apps/explorer/README.md b/apps/explorer/README.md index 22b0dc96b6..2ad45d37a6 100644 --- a/apps/explorer/README.md +++ b/apps/explorer/README.md @@ -5,9 +5,9 @@ This is a tool for inspecting and analyzing the POA Network blockchain. ## Machine Requirements -* Erlang/OTP 20.2+ -* Elixir 1.5+ -* Postgres 10.0 +* Erlang/OTP 21+ +* Elixir 1.9+ +* Postgres 10.3 ## Required Accounts @@ -21,7 +21,6 @@ This is a tool for inspecting and analyzing the POA Network blockchain. To get BlockScout up and running locally: - * Set up some default configuration with: `$ cp config/dev.secret.exs.example config/dev.secret.exs` * Install dependencies with `$ mix do deps.get, local.rebar, deps.compile, compile` * Create and migrate your database with `$ mix ecto.create && mix ecto.migrate` * Run IEx (Interactive Elixir) to access the index and explore: `$ iex -S mix` diff --git a/apps/explorer/config/dev.exs b/apps/explorer/config/dev.exs index a9d0f53b15..cbed0f47d7 100644 --- a/apps/explorer/config/dev.exs +++ b/apps/explorer/config/dev.exs @@ -2,9 +2,8 @@ use Mix.Config # Configure your database config :explorer, Explorer.Repo, - database: "explorer_dev", - hostname: "localhost", - pool_size: 20, + url: System.get_env("DATABASE_URL"), + pool_size: String.to_integer(System.get_env("POOL_SIZE") || "50"), timeout: :timer.seconds(80) config :explorer, Explorer.Tracer, env: "dev", disabled?: true @@ -23,8 +22,6 @@ config :logger, :token_instances, path: Path.absname("logs/dev/explorer/tokens/token_instances.log"), metadata_filter: [fetcher: :token_instances] -import_config "dev.secret.exs" - variant = if is_nil(System.get_env("ETHEREUM_JSONRPC_VARIANT")) do "ganache" diff --git a/apps/explorer/config/dev.secret.exs.example b/apps/explorer/config/dev.secret.exs.example deleted file mode 100644 index bde88d33f1..0000000000 --- a/apps/explorer/config/dev.secret.exs.example +++ /dev/null @@ -1,10 +0,0 @@ -use Mix.Config - -# Configure your database -config :explorer, Explorer.Repo, - database: "explorer_dev", - hostname: "localhost", - username: "postgres", - password: "", - pool_size: 20, - timeout: 80_000