Set integration with Blockscout eth bytecode DB endpoint by default, replace old UI with new one in docker-compose configs, set default value for port: 4000

vb-define-default-port
Viktor Baranov 1 year ago
parent af275a2777
commit 1d6da1b305
  1. 3
      .dockerignore
  2. 4
      .tool-versions
  3. 1
      CHANGELOG.md
  4. 11
      apps/explorer/lib/explorer/repo/config_helper.ex
  5. 4
      config/runtime.exs
  6. 11
      config/runtime/dev.exs
  7. 6
      config/runtime/prod.exs
  8. 6
      deploy/testing/eth-goerli/.sops.yaml
  9. 158
      deploy/testing/eth-goerli/secrets.yaml
  10. 436
      deploy/testing/eth-goerli/values.yaml
  11. 15
      docker-compose/README.md
  12. 13
      docker-compose/docker-compose-no-build-erigon.yml
  13. 5
      docker-compose/docker-compose-no-build-external-backend.yml
  14. 13
      docker-compose/docker-compose-no-build-external-frontend.yml
  15. 92
      docker-compose/docker-compose-no-build-frontend.yml
  16. 42
      docker-compose/docker-compose-no-build-ganache.yml
  17. 43
      docker-compose/docker-compose-no-build-geth-clique-consensus.yml
  18. 43
      docker-compose/docker-compose-no-build-geth.yml
  19. 42
      docker-compose/docker-compose-no-build-hardhat-network.yml
  20. 43
      docker-compose/docker-compose-no-build-nethermind.yml
  21. 43
      docker-compose/docker-compose-no-build-no-db-container.yml
  22. 49
      docker-compose/docker-compose-no-rust-services.yml
  23. 47
      docker-compose/docker-compose.yml
  24. 9
      docker-compose/envs/common-blockscout.env
  25. 12
      docker/Dockerfile
  26. 4
      docker/Makefile

@ -5,5 +5,8 @@ apps/explorer/node_modules
test test
.git .git
.circleci .circleci
.vscode
.elixir_ls
erl_crash.dump
logs logs
apps/*/test apps/*/test

@ -1,3 +1,3 @@
elixir 1.14.5-otp-25 elixir 1.14.5-otp-25
erlang 25.3.2.3 erlang 25.3.2.6
nodejs 18.16.1 nodejs 18.17.1

@ -31,6 +31,7 @@
### Chore ### Chore
- [#8478](https://github.com/blockscout/blockscout/pull/8478) - Set integration with Blockscout's eth bytecode DB endpoint by default and other enhancements
- [#8442](https://github.com/blockscout/blockscout/pull/8442) - Unify burn address definition - [#8442](https://github.com/blockscout/blockscout/pull/8442) - Unify burn address definition
- [#8321](https://github.com/blockscout/blockscout/pull/8321) - Add curl into resulting Docker image - [#8321](https://github.com/blockscout/blockscout/pull/8321) - Add curl into resulting Docker image
- [#8319](https://github.com/blockscout/blockscout/pull/8319) - Add MIX_ENV: 'prod' to docker-compose - [#8319](https://github.com/blockscout/blockscout/pull/8319) - Add MIX_ENV: 'prod' to docker-compose

@ -58,6 +58,17 @@ defmodule Explorer.Repo.ConfigHelper do
path_from_env(path) path_from_env(path)
end end
@doc """
Defines http port of the application
"""
@spec get_port() :: non_neg_integer()
def get_port do
case System.get_env("PORT") && Integer.parse(System.get_env("PORT")) do
{port, _} -> port
_ -> 4000
end
end
defp path_from_env(path_env_var) do defp path_from_env(path_env_var) do
if String.ends_with?(path_env_var, "/") do if String.ends_with?(path_env_var, "/") do
path_env_var path_env_var

@ -353,10 +353,10 @@ config :explorer, Explorer.ThirdPartyIntegrations.Sourcify,
repo_url: System.get_env("SOURCIFY_REPO_URL") || "https://repo.sourcify.dev/contracts" repo_url: System.get_env("SOURCIFY_REPO_URL") || "https://repo.sourcify.dev/contracts"
config :explorer, Explorer.SmartContract.RustVerifierInterfaceBehaviour, config :explorer, Explorer.SmartContract.RustVerifierInterfaceBehaviour,
service_url: System.get_env("MICROSERVICE_SC_VERIFIER_URL"), service_url: System.get_env("MICROSERVICE_SC_VERIFIER_URL") || "https://eth-bytecode-db.services.blockscout.com/",
enabled: ConfigHelper.parse_bool_env_var("MICROSERVICE_SC_VERIFIER_ENABLED"), enabled: ConfigHelper.parse_bool_env_var("MICROSERVICE_SC_VERIFIER_ENABLED"),
# or "eth_bytecode_db" # or "eth_bytecode_db"
type: System.get_env("MICROSERVICE_SC_VERIFIER_TYPE", "sc_verifier") type: System.get_env("MICROSERVICE_SC_VERIFIER_TYPE", "eth_bytecode_db")
config :explorer, Explorer.Visualize.Sol2uml, config :explorer, Explorer.Visualize.Sol2uml,
service_url: System.get_env("MICROSERVICE_VISUALIZE_SOL2UML_URL"), service_url: System.get_env("MICROSERVICE_VISUALIZE_SOL2UML_URL"),

@ -7,25 +7,20 @@ alias Explorer.Repo.ConfigHelper, as: ExplorerConfigHelper
### BlockScout Web ### ### BlockScout Web ###
###################### ######################
port = port = ExplorerConfigHelper.get_port()
case System.get_env("PORT") && Integer.parse(System.get_env("PORT")) do
{port, _} -> port
:error -> nil
nil -> nil
end
config :block_scout_web, BlockScoutWeb.Endpoint, config :block_scout_web, BlockScoutWeb.Endpoint,
secret_key_base: secret_key_base:
System.get_env("SECRET_KEY_BASE") || "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5", System.get_env("SECRET_KEY_BASE") || "RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5",
http: [ http: [
port: port || 4000 port: port
], ],
url: [ url: [
scheme: "http", scheme: "http",
host: System.get_env("BLOCKSCOUT_HOST", "localhost") host: System.get_env("BLOCKSCOUT_HOST", "localhost")
], ],
https: [ https: [
port: (port && port + 1) || 4001, port: port + 1,
cipher_suite: :strong, cipher_suite: :strong,
certfile: System.get_env("CERTFILE") || "priv/cert/selfsigned.pem", certfile: System.get_env("CERTFILE") || "priv/cert/selfsigned.pem",
keyfile: System.get_env("KEYFILE") || "priv/cert/selfsigned_key.pem" keyfile: System.get_env("KEYFILE") || "priv/cert/selfsigned_key.pem"

@ -7,13 +7,15 @@ alias Explorer.Repo.ConfigHelper, as: ExplorerConfigHelper
### BlockScout Web ### ### BlockScout Web ###
###################### ######################
port = ExplorerConfigHelper.get_port()
config :block_scout_web, BlockScoutWeb.Endpoint, config :block_scout_web, BlockScoutWeb.Endpoint,
secret_key_base: System.get_env("SECRET_KEY_BASE"), secret_key_base: System.get_env("SECRET_KEY_BASE"),
check_origin: System.get_env("CHECK_ORIGIN", "false") == "true" || false, check_origin: System.get_env("CHECK_ORIGIN", "false") == "true" || false,
http: [port: System.get_env("PORT")], http: [port: port],
url: [ url: [
scheme: System.get_env("BLOCKSCOUT_PROTOCOL") || "https", scheme: System.get_env("BLOCKSCOUT_PROTOCOL") || "https",
port: System.get_env("PORT"), port: port,
host: System.get_env("BLOCKSCOUT_HOST") || "localhost" host: System.get_env("BLOCKSCOUT_HOST") || "localhost"
] ]

@ -1,6 +0,0 @@
---
creation_rules:
- path_regex: ^(.+/)?secrets\.yaml$
pgp: >-
99E83B7490B1A9F51781E6055317CE0D5CE1230B

File diff suppressed because one or more lines are too long

@ -1,436 +0,0 @@
global:
env: testnet
blockscout:
enabled: true
image:
_default: &image blockscout/blockscout:latest
ingress:
enabled: true
tls:
enabled: true
createSecret: true
# init container
init:
enabled: true
image:
_default: *image
resources:
limits:
memory:
_default: "8Gi"
cpu:
_default: "3"
requests:
memory:
_default: "6Gi"
cpu:
_default: "2"
# node label
nodeSelector:
enabled: true
labels:
_default:
app: blockscout
environment:
ETHEREUM_JSONRPC_VARIANT:
_default: geth
HEART_BEAT_TIMEOUT:
_default: 30
PORT:
_default: 4000
SUBNETWORK:
_default: Goerli
HEALTHY_BLOCKS_PERIOD:
_default: 60
NETWORK:
_default: (Ethereum)
NETWORK_ICON:
_default: _network_icon.html
COIN:
_default: ETH
ECTO_USE_SSL:
_default: 'false'
COIN_NAME:
_default: ETH
LOGO:
_default: /images/goerli_logo.svg
TXS_STATS_DAYS_TO_COMPILE_AT_INIT:
_default: 10
COIN_BALANCE_HISTORY_DAYS:
_default: 90
POOL_SIZE:
_default: 300
POOL_SIZE_API:
_default: 10
ACCOUNT_POOL_SIZE:
_default: 10
DISPLAY_TOKEN_ICONS:
_default: 'true'
FETCH_REWARDS_WAY:
_default: manual
SHOW_TESTNET_LABEL:
_default: 'true'
CHAIN_ID:
_default: 5
MICROSERVICE_SC_VERIFIER_ENABLED:
_default: 'true'
MICROSERVICE_VISUALIZE_SOL2UML_ENABLED:
_default: 'true'
MICROSERVICE_SIG_PROVIDER_ENABLED:
_default: 'true'
INDEXER_MEMORY_LIMIT:
_default: 7
ACCOUNT_ENABLED:
_default: 'true'
API_V2_ENABLED:
_default: 'true'
APPS_MENU:
_default: 'true'
APPS:
_default: '[{"title": "Marketplace", "url": "/apps", "embedded?": true}]'
ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT:
_default: '20s'
ETHEREUM_JSONRPC_HTTP_TIMEOUT:
_default: 60
INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE:
_default: 15
INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER:
_default: 'true'
INDEXER_RECEIPTS_BATCH_SIZE:
_default: 50
INDEXER_COIN_BALANCES_BATCH_SIZE:
_default: 50
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER:
_default: 'true'
INDEXER_TX_ACTIONS_ENABLE:
_default: 'true'
DISABLE_EXCHANGE_RATES:
_default: 'true'
SOURCIFY_INTEGRATION_ENABLED:
_default: 'true'
frontend:
app: blockscout
enabled: true
image:
_default: ghcr.io/blockscout/frontend:main
replicas:
app: 2
ingress:
enabled: true
# enable https
tls:
enabled: true
createSecret: false
path:
exact:
- "/"
prefix:
- "/apps"
- "/_next"
- "/node-api"
- "/static"
- "/auth/profile"
- "/account"
- "/txs"
- "/tx"
- "/blocks"
- "/block"
- "/stats"
- "/address"
- "/search-results"
- "/token"
- "/tokens"
- "/accounts"
- "/visualize"
- "/api-docs"
- "/csv-export"
resources:
limits:
memory:
_default: "2Gi"
cpu:
_default: "2"
requests:
memory:
_default: "512Mi"
cpu:
_default: "250m"
# node label
nodeSelector:
enabled: true
labels:
_default:
app: blockscout-prod
environment:
# ui config
NEXT_PUBLIC_NETWORK_EXPLORERS:
_default: "[{'title':'Etherscan','baseUrl':'https://goerli.etherscan.io/','paths':{'tx':'/tx','address':'/address'}}]"
# network config
NEXT_PUBLIC_NETWORK_NAME:
_default: Ethereum
NEXT_PUBLIC_NETWORK_SHORT_NAME:
_default: Goerli
NEXT_PUBLIC_NETWORK_ASSETS_PATHNAME:
_default: ethereum
NEXT_PUBLIC_NETWORK_ID:
_default: 5
NEXT_PUBLIC_NETWORK_CURRENCY_NAME:
_default: Ether
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL:
_default: ETH
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS:
_default: 18
NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS:
_default: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED:
_default: true
NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE:
_default: validation
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM:
_default: https://airtable.com/shrqUAcjgGJ4jU88C
# api config
NEXT_PUBLIC_API_BASE_PATH:
_default: /
NEXT_PUBLIC_FOOTER_GITHUB_LINK:
_default: https://github.com/blockscout/blockscout
NEXT_PUBLIC_FOOTER_TWITTER_LINK:
_default: https://www.twitter.com/blockscoutcom
NEXT_PUBLIC_APP_ENV:
_default: staging
NEXT_PUBLIC_APP_INSTANCE:
_default: unknown
NEXT_PUBLIC_HOMEPAGE_CHARTS:
_default: "['daily_txs']"
NEXT_PUBLIC_NETWORK_RPC_URL:
_default: https://rpc.ankr.com/eth_goerli
NEXT_PUBLIC_IS_TESTNET:
_default: 'true'
NEXT_PUBLIC_API_SPEC_URL:
_default: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
# enable stats deploy
stats:
enabled: true
image:
_default: ghcr.io/blockscout/stats:main
# enable ingress
ingress:
enabled: true
# enable https
tls:
enabled: true
createSecret: true
resources:
limits:
memory:
_default: 128Mi
cpu:
_default: 100m
requests:
memory:
_default: 128Mi
cpu:
_default: 100m
# node label
nodeSelector:
enabled: true
labels:
_default:
app: blockscout
# enable Horizontal Pod Autoscaler
hpa:
enabled: true
environment:
RUST_LOG:
_default: info
STATS__RUN_MIGRATIONS:
_default: 'true'
STATS__TRACING__FORMAT:
_default: json
STATS__METRICS__ENABLED:
_default: 'true'
postgres:
enabled: true
image: postgres:14.7
port: 5432
command: '["docker-entrypoint.sh", "-c"]'
args: '["max_connections=500"]'
customShm:
enabled: false
files:
enabled: true
mountPath: /docker-entrypoint-initdb.d
persistence: true
storage: 500Gi
resources:
limits:
memory:
_default: "2Gi"
cpu:
_default: "2"
requests:
memory:
_default: "2Gi"
cpu:
_default: "2"
# enable Smart-contract-verifier deploy
scVerifier:
enabled: true
image:
_default: ghcr.io/blockscout/smart-contract-verifier:main
# enable ingress
ingress:
enabled: true
# enable https
tls:
enabled: true
resources:
limits:
memory:
_default: 512Mi
cpu:
_default: 250m
requests:
memory:
_default: 512Mi
cpu:
_default: 250m
# probes
livenessProbe:
enabled: true
# path: /health
readinessProbe:
enabled: true
# path: /health
# enable Horizontal Pod Autoscaler
hpa:
enabled: true
environment:
SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR:
_default: 0.0.0.0:8050
SMART_CONTRACT_VERIFIER__SERVER__GRPC__ADDR:
_default: 0.0.0.0:8051
# SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED:
# _default: 'true'
SMART_CONTRACT_VERIFIER__SOLIDITY__COMPILERS_DIR:
_default: /tmp/solidity-compilers
SMART_CONTRACT_VERIFIER__SOLIDITY__REFRESH_VERSIONS_SCHEDULE:
_default: 0 0 * * * * *
# It depends on the OS you are running the service on
# SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL:
# _default: https://solc-bin.ethereum.org/linux-amd64/list.json
#SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL=https://solc-bin.ethereum.org/macosx-amd64/list.json
#SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL=https://solc-bin.ethereum.org/windows-amd64/list.json
SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__S3__REGION:
_default: ""
SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__S3__ENDPOINT:
_default: https://storage.googleapis.com
SMART_CONTRACT_VERIFIER__SOURCIFY__ENABLED:
_default: 'true'
SMART_CONTRACT_VERIFIER__SOURCIFY__API_URL:
_default: https://sourcify.dev/server/
SMART_CONTRACT_VERIFIER__SOURCIFY__VERIFICATION_ATTEMPTS:
_default: 3
SMART_CONTRACT_VERIFIER__SOURCIFY__REQUEST_TIMEOUT:
_default: 10
SMART_CONTRACT_VERIFIER__METRICS__ENABLED:
_default: 'true'
SMART_CONTRACT_VERIFIER__METRICS__ADDR:
_default: 0.0.0.0:6060
SMART_CONTRACT_VERIFIER__METRICS__ROUTE:
_default: /metrics
SMART_CONTRACT_VERIFIER__JAEGER__ENABLED:
_default: 'false'
# enable visualizer deploy
visualizer:
enabled: true
image:
_default: ghcr.io/blockscout/visualizer:main
# enable ingress
ingress:
enabled: true
host:
_default: visualizer.test.aws-k8s.blockscout.com
# enable https
tls:
enabled: true
createSecret: false
resources:
limits:
memory:
_default: 64Mi
cpu:
_default: 50m
requests:
memory:
_default: 64Mi
cpu:
_default: 50m
# node label
nodeSelector:
enabled: true
labels:
_default:
app: blockscout
environment:
VISUALIZER__SERVER__HTTP__ENABLED:
_default: 'true'
VISUALIZER__SERVER__HTTP__ADDR:
_default: 0.0.0.0:8050
VISUALIZER__SERVER__GRPC__ENABLED:
_default: 'false'
# enable sig-provider deploy
sigProvider:
enabled: true
image:
_default: ghcr.io/blockscout/sig-provider:main
# enable ingress
ingress:
enabled: true
# enable https
tls:
enabled: true
createSecret: false
# enable Horizontal Pod Autoscaler
hpa:
enabled: false
# probes
livenessProbe:
enabled: false
readinessProbe:
enabled: false
environment:
SIG_PROVIDER__METRICS__ENABLED:
_default: 'true'
SIG_PROVIDER__SERVER__HTTP__ADDR:
_default: 0.0.0.0:8043
SIG_PROVIDER__SERVER__GRPC__ENABLED:
_default: 'false'

@ -14,29 +14,22 @@ Runs Blockscout locally in Docker containers with [docker-compose](https://githu
docker-compose up --build docker-compose up --build
``` ```
This command uses by-default `docker-compose.yml`, which builds the explorer into the Docker image and runs 6 Docker containers: This command uses by-default `docker-compose.yml`, which builds the explorer into the Docker image and runs 5 Docker containers:
- Postgres 14.x database, which will be available at port 7432 on localhost. - Postgres 14.x database, which will be available at port 7432 on localhost.
- Redis database of latest version, which will be available at port 6379 on localhost. - Redis database of latest version, which will be available at port 6379 on localhost.
- Blockscout explorer at http://localhost:4000. - Blockscout explorer at http://localhost:4000.
and 3 Rust microservices: and 2 microservices (written in Rust):
- [Smart-contract-verifier](https://github.com/blockscout/blockscout-rs/tree/main/smart-contract-verifier) service, which will be available at port 8150 on the host machine.
- [Sig-provider](https://github.com/blockscout/blockscout-rs/tree/main/sig-provider) service, which will be available at port 8151 on the host machine. - [Sig-provider](https://github.com/blockscout/blockscout-rs/tree/main/sig-provider) service, which will be available at port 8151 on the host machine.
- [Sol2UML visualizer](https://github.com/blockscout/blockscout-rs/tree/main/visualizer) service, which will be available at port 8152 on the host machine. - [Sol2UML visualizer](https://github.com/blockscout/blockscout-rs/tree/main/visualizer) service, which will be available at port 8152 on the host machine.
Note for Linux users: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/ Note for Linux users: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/
## Building Docker containers from source with native smart contract verification (deprecated)
```bash
docker-compose -f docker-compose-no-rust-verification.yml up --build
```
## Configs for different Ethereum clients ## Configs for different Ethereum clients
The repo contains built-in configs for different clients without needing to build the image. The repo contains built-in configs for different JSON RPC clients without need to build the image.
- Erigon: `docker-compose -f docker-compose-no-build-erigon.yml up -d` - Erigon: `docker-compose -f docker-compose-no-build-erigon.yml up -d`
- Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d` - Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d`
@ -47,6 +40,8 @@ The repo contains built-in configs for different clients without needing to buil
All of the configs assume the Ethereum JSON RPC is running at http://localhost:8545. All of the configs assume the Ethereum JSON RPC is running at http://localhost:8545.
Explorer UI will be available at http://localhost.
In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, replacing `config_file.yml` with the file name of the config which was previously launched. In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, replacing `config_file.yml` with the file name of the config which was previously launched.
You can adjust BlockScout environment variables from `./envs/common-blockscout.env`. Descriptions of the ENVs are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). You can adjust BlockScout environment variables from `./envs/common-blockscout.env`. Descriptions of the ENVs are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables).

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -33,19 +32,11 @@ services:
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml

@ -11,11 +11,6 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml

@ -14,13 +14,12 @@ services:
backend: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-master} image: blockscout/blockscout:${DOCKER_TAG:-master}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -36,22 +35,12 @@ services:
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true' INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true'
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true'
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
CHAIN_ID: '1337' CHAIN_ID: '1337'
API_V2_ENABLED: 'true'
MIX_ENV: 'prod'
ACCOUNT_ENABLED: 'false'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml

@ -1,92 +0,0 @@
version: '3.8'
services:
redis_db:
extends:
file: ./services/docker-compose-redis.yml
service: redis_db
db:
extends:
file: ./services/docker-compose-db.yml
service: db
backend:
depends_on:
- db
- smart-contract-verifier
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-master}
pull_policy: always
restart: always
stop_grace_period: 5m
container_name: 'blockscout'
links:
- db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ./envs/common-blockscout.env
environment:
ETHEREUM_JSONRPC_VARIANT: 'ganache'
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true'
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true'
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
CHAIN_ID: '1337'
API_V2_ENABLED: 'true'
MIX_ENV: 'prod'
ports:
- 4000:4000
volumes:
- ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer:
extends:
file: ./services/docker-compose-visualizer.yml
service: visualizer
sig-provider:
extends:
file: ./services/docker-compose-sig-provider.yml
service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -35,19 +34,12 @@ services:
INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true' INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: 'true'
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true'
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
CHAIN_ID: '1337' CHAIN_ID: '1337'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -57,3 +49,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -34,19 +33,11 @@ services:
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -56,3 +47,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -33,19 +32,11 @@ services:
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -55,3 +46,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -34,18 +33,11 @@ services:
ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/ ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/
INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true'
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -55,3 +47,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -11,16 +11,15 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -33,19 +32,11 @@ services:
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -55,3 +46,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -6,15 +6,14 @@ services:
file: ./services/docker-compose-redis.yml file: ./services/docker-compose-redis.yml
service: redis_db service: redis_db
blockscout: backend:
depends_on: depends_on:
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always pull_policy: always
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
extra_hosts: extra_hosts:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
@ -24,19 +23,11 @@ services:
ETHEREUM_JSONRPC_VARIANT: 'geth' ETHEREUM_JSONRPC_VARIANT: 'geth'
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:5432/blockscout?ssl=false DATABASE_URL: postgresql://postgres:@host.docker.internal:5432/blockscout?ssl=false
ECTO_USE_SSL: 'false'
SECRET_KEY_BASE: '56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN'
MIX_ENV: 'prod'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -46,3 +37,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -1,49 +0,0 @@
version: '3.8'
services:
redis_db:
extends:
file: ./services/docker-compose-redis.yml
service: redis_db
db:
extends:
file: ./services/docker-compose-db.yml
service: db
blockscout:
depends_on:
- db
- redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest}
build:
context: ..
dockerfile: ./docker/Dockerfile
args:
CACHE_EXCHANGE_RATES_PERIOD: ""
API_V1_READ_METHODS_DISABLED: "false"
DISABLE_WEBAPP: "false"
API_V1_WRITE_METHODS_DISABLED: "false"
CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED: ""
CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: ""
ADMIN_PANEL_ENABLED: ""
RELEASE_VERSION: 5.2.2
MIX_ENV: 'prod'
restart: always
stop_grace_period: 5m
container_name: 'blockscout'
links:
- db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ./envs/common-blockscout.env
environment:
MICROSERVICE_SC_VERIFIER_ENABLED: 'false'
MICROSERVICE_VISUALIZE_SOL2UML_ENABLED: 'false'
MICROSERVICE_SIG_PROVIDER_ENABLED: 'false'
ports:
- 4000:4000
volumes:
- ./logs/:/app/logs/

@ -11,12 +11,12 @@ services:
file: ./services/docker-compose-db.yml file: ./services/docker-compose-db.yml
service: db service: db
blockscout: backend:
depends_on: depends_on:
- db - db
- smart-contract-verifier
- redis_db - redis_db
image: blockscout/blockscout:${DOCKER_TAG:-latest} image: blockscout/blockscout:${DOCKER_TAG:-latest}
pull_policy: always
build: build:
context: .. context: ..
dockerfile: ./docker/Dockerfile dockerfile: ./docker/Dockerfile
@ -31,7 +31,7 @@ services:
RELEASE_VERSION: 5.2.2 RELEASE_VERSION: 5.2.2
restart: always restart: always
stop_grace_period: 5m stop_grace_period: 5m
container_name: 'blockscout' container_name: 'backend'
links: links:
- db:database - db:database
command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
@ -39,16 +39,17 @@ services:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
env_file: env_file:
- ./envs/common-blockscout.env - ./envs/common-blockscout.env
environment:
ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_TRACE_URL: http://host.docker.internal:8545/
ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/
DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false
CHAIN_ID: '1337'
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./logs/:/app/logs/ - ./logs/:/app/logs/
smart-contract-verifier:
extends:
file: ./services/docker-compose-smart-contract-verifier.yml
service: smart-contract-verifier
visualizer: visualizer:
extends: extends:
file: ./services/docker-compose-visualizer.yml file: ./services/docker-compose-visualizer.yml
@ -58,3 +59,33 @@ services:
extends: extends:
file: ./services/docker-compose-sig-provider.yml file: ./services/docker-compose-sig-provider.yml
service: sig-provider service: sig-provider
frontend:
depends_on:
- backend
extends:
file: ./services/docker-compose-frontend.yml
service: frontend
stats-db:
depends_on:
- backend
extends:
file: ./services/docker-compose-stats.yml
service: stats-db
stats:
depends_on:
- stats-db
extends:
file: ./services/docker-compose-stats.yml
service: stats
proxy:
depends_on:
- backend
- frontend
- stats
extends:
file: ./services/docker-compose-nginx.yml
service: proxy

@ -18,7 +18,7 @@ IPC_PATH=
NETWORK_PATH=/ NETWORK_PATH=/
BLOCKSCOUT_HOST= BLOCKSCOUT_HOST=
BLOCKSCOUT_PROTOCOL= BLOCKSCOUT_PROTOCOL=
# SECRET_KEY_BASE= SECRET_KEY_BASE=56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN
# CHECK_ORIGIN= # CHECK_ORIGIN=
PORT=4000 PORT=4000
COIN_NAME= COIN_NAME=
@ -184,8 +184,10 @@ API_RATE_LIMIT_BY_IP=3000
API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS=18000 API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS=18000
FETCH_REWARDS_WAY=trace_block FETCH_REWARDS_WAY=trace_block
MICROSERVICE_SC_VERIFIER_ENABLED=true MICROSERVICE_SC_VERIFIER_ENABLED=true
MICROSERVICE_SC_VERIFIER_URL=http://smart-contract-verifier:8050/ #MICROSERVICE_SC_VERIFIER_URL=http://smart-contract-verifier:8050/
MICROSERVICE_SC_VERIFIER_TYPE=sc_verifier #MICROSERVICE_SC_VERIFIER_TYPE=sc_verifier
MICROSERVICE_SC_VERIFIER_URL=https://eth-bytecode-db.services.blockscout.com/
MICROSERVICE_SC_VERIFIER_TYPE=eth_bytecode_db
MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS=10m MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS=10m
MICROSERVICE_VISUALIZE_SOL2UML_ENABLED=true MICROSERVICE_VISUALIZE_SOL2UML_ENABLED=true
MICROSERVICE_VISUALIZE_SOL2UML_URL=http://visualizer:8050/ MICROSERVICE_VISUALIZE_SOL2UML_URL=http://visualizer:8050/
@ -216,3 +218,4 @@ EIP_1559_ELASTICITY_MULTIPLIER=2
# INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE=10 # INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE=10
# INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE=1 # INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE=1
# INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE=10 # INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE=10
API_V2_ENABLED=true

@ -2,11 +2,9 @@ FROM hexpm/elixir:1.14.5-erlang-25.3.2.4-alpine-3.18.2 AS builder
WORKDIR /app WORKDIR /app
RUN apk --no-cache --update add alpine-sdk gmp-dev automake libtool inotify-tools autoconf python3 file gcompat RUN apk --no-cache --update add alpine-sdk gmp-dev automake libtool inotify-tools autoconf python3 file libstdc++ curl ca-certificates gcompat
ENV PORT=4000 \ ENV MIX_ENV="prod"
MIX_ENV="prod" \
SECRET_KEY_BASE="RMgI4C1HSkxsEjdhtGMfwAHfyT6CKWXOgzCboJflfSm4jeAlic52io05KB6mqzc5"
RUN apk --update add libstdc++ curl ca-certificates gcompat RUN apk --update add libstdc++ curl ca-certificates gcompat
@ -49,11 +47,7 @@ RUN cd apps/block_scout_web/assets/ && \
npm install && \ npm install && \
npm run deploy && \ npm run deploy && \
cd /app/apps/explorer/ && \ cd /app/apps/explorer/ && \
npm install && \ npm install
apk update && \
apk del --force-broken-world alpine-sdk gmp-dev automake libtool inotify-tools autoconf python3
RUN apk add --update git make
RUN export "CFLAGS=-I/usr/local/include -L/usr/local/lib" && cd deps/ex_secp256k1 && mix deps.get && mix compile RUN export "CFLAGS=-I/usr/local/include -L/usr/local/lib" && cd deps/ex_secp256k1 && mix deps.get && mix compile
RUN mix phx.digest RUN mix phx.digest

@ -23,7 +23,7 @@ else
ECTO_USE_SSL = 'false' ECTO_USE_SSL = 'false'
endif endif
BLOCKSCOUT_CONTAINER_PARAMS = -e 'MIX_ENV=prod' \ BLOCKSCOUT_CONTAINER_PARAMS = -e 'MIX_ENV=prod' \
-e 'DATABASE_URL=$(DB_URL)' -e 'DATABASE_URL=$(DB_URL)'
ifeq ($(SYSTEM), Linux) ifeq ($(SYSTEM), Linux)
BLOCKSCOUT_CONTAINER_PARAMS += --network=host BLOCKSCOUT_CONTAINER_PARAMS += --network=host
endif endif
@ -805,7 +805,7 @@ start: build postgres
-p 4000:4000 \ -p 4000:4000 \
$(BS_CONTAINER_IMAGE) /bin/sh -c "./bin/blockscout start" $(BS_CONTAINER_IMAGE) /bin/sh -c "./bin/blockscout start"
BS_STARTED := $(shell docker ps --no-trunc --filter name=^/${BS_CONTAINER_NAME}$) BS_STARTED := $(shell docker ps --no-trunc --filter name=^/${BS_CONTAINER_NAME}$ | grep ${BS_CONTAINER_NAME})
stop: stop:
ifdef BS_STARTED ifdef BS_STARTED
@echo "==> Stopping BlockScout container." @echo "==> Stopping BlockScout container."

Loading…
Cancel
Save