diff --git a/.gitignore b/.gitignore index 77e0d82c4c..9e53084c62 100644 --- a/.gitignore +++ b/.gitignore @@ -51,8 +51,8 @@ dump.rdb /docker-compose/services/blockscout-db-data /docker-compose/services/stats-db-data /docker-compose/services/redis-data +/docker-compose/services/logs /docker-compose/tmp -/docker-compose/logs .idea/ *.iml diff --git a/CHANGELOG.md b/CHANGELOG.md index f20e2a5fb0..fb84e4dfde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Chore +- [#8504](https://github.com/blockscout/blockscout/pull/8504) - Deploy new UI through Makefile - [#8501](https://github.com/blockscout/blockscout/pull/8501) - Conceal secondary ports in docker compose setup ## 5.2.3-beta diff --git a/docker-compose/README.md b/docker-compose/README.md index 02db1bdd11..ded1ce9ad0 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -15,7 +15,7 @@ cd ./docker-compose docker-compose up --build ``` -Note: if you don't need to make backend customizations, you can run `docker-compose up` in order to launch from pre-build backend Docker image. This will be much faster. +**Note**: if you don't need to make backend customizations, you can run `docker-compose up` in order to launch from pre-build backend Docker image. This will be much faster. This command uses `docker-compose.yml` by-default, which builds the backend of the explorer into the Docker image and runs 9 Docker containers: @@ -31,7 +31,7 @@ and 4 containers for microservices (written in Rust): - [Sol2UML visualizer](https://github.com/blockscout/blockscout-rs/tree/main/visualizer) service. - [Sig-provider](https://github.com/blockscout/blockscout-rs/tree/main/sig-provider) service. -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/ ## Configs for different Ethereum clients @@ -59,5 +59,26 @@ You can adjust BlockScout environment variables: - for visualizer in `./envs/common-visualizer.env` Descriptions of the ENVs are available -- for [backend](https://docs.blockscout.com/for-developers/information-and-settings/env-variables) -- for [frontend](https://github.com/blockscout/frontend/blob/main/docs/ENVS.md). + +- for [backend](https://docs.blockscout.com/for-developers/information-and-settings/env-variables) +- for [frontend](https://github.com/blockscout/frontend/blob/main/docs/ENVS.md). + +## Running Docker containers via Makefile + +Prerequisites are the same, as for docker-compose setup. + +Start all containers: + +```bash +cd ./docker +make start +``` + +Stop all containers: + +```bash +cd ./docker +make stop +``` + +***Note***: Makefile uses the same .env files since it is running docker-compose services inside. diff --git a/docker-compose/docker-compose-no-build-erigon.yml b/docker-compose/docker-compose-no-build-erigon.yml index ded39cde19..bd8fb304b1 100644 --- a/docker-compose/docker-compose-no-build-erigon.yml +++ b/docker-compose/docker-compose-no-build-erigon.yml @@ -15,25 +15,16 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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: 'erigon' ETHEREUM_JSONRPC_HTTP_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 - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-external-frontend.yml b/docker-compose/docker-compose-no-build-external-frontend.yml index 924526cdc5..d7bef3f12f 100644 --- a/docker-compose/docker-compose-no-build-external-frontend.yml +++ b/docker-compose/docker-compose-no-build-external-frontend.yml @@ -15,18 +15,11 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-master} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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/ @@ -36,8 +29,6 @@ services: INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false CHAIN_ID: '1337' - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-ganache.yml b/docker-compose/docker-compose-no-build-ganache.yml index e02daf2fa7..291913e36b 100644 --- a/docker-compose/docker-compose-no-build-ganache.yml +++ b/docker-compose/docker-compose-no-build-ganache.yml @@ -15,18 +15,11 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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/ @@ -35,8 +28,6 @@ services: INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false CHAIN_ID: '1337' - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-geth-clique-consensus.yml b/docker-compose/docker-compose-no-build-geth-clique-consensus.yml index b168c2d3a0..ec01bd0c68 100644 --- a/docker-compose/docker-compose-no-build-geth-clique-consensus.yml +++ b/docker-compose/docker-compose-no-build-geth-clique-consensus.yml @@ -15,26 +15,17 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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: 'geth' BLOCK_TRANSFORMER: 'clique' ETHEREUM_JSONRPC_HTTP_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 - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-geth.yml b/docker-compose/docker-compose-no-build-geth.yml index b060cf6fcf..430f2d0d75 100644 --- a/docker-compose/docker-compose-no-build-geth.yml +++ b/docker-compose/docker-compose-no-build-geth.yml @@ -15,25 +15,16 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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: 'geth' ETHEREUM_JSONRPC_HTTP_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 - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-hardhat-network.yml b/docker-compose/docker-compose-no-build-hardhat-network.yml index a8838e7b6c..fcf3b74afb 100644 --- a/docker-compose/docker-compose-no-build-hardhat-network.yml +++ b/docker-compose/docker-compose-no-build-hardhat-network.yml @@ -15,26 +15,17 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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: 'geth' ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ ETHEREUM_JSONRPC_WS_URL: ws://host.docker.internal:8545/ INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: 'true' DATABASE_URL: postgresql://postgres:@host.docker.internal:7432/blockscout?ssl=false - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-nethermind.yml b/docker-compose/docker-compose-no-build-nethermind.yml index f5c4efd553..a8daf005fd 100644 --- a/docker-compose/docker-compose-no-build-nethermind.yml +++ b/docker-compose/docker-compose-no-build-nethermind.yml @@ -15,25 +15,16 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' + extends: + file: ./services/docker-compose-backend.yml + service: backend 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: 'nethermind' ETHEREUM_JSONRPC_HTTP_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 - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose-no-build-no-db-container.yml b/docker-compose/docker-compose-no-build-no-db-container.yml index b183fcc21e..f868086908 100644 --- a/docker-compose/docker-compose-no-build-no-db-container.yml +++ b/docker-compose/docker-compose-no-build-no-db-container.yml @@ -9,22 +9,13 @@ services: backend: depends_on: - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always - restart: always - stop_grace_period: 5m - container_name: 'backend' - 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 + extends: + file: ./services/docker-compose-backend.yml + service: backend environment: ETHEREUM_JSONRPC_VARIANT: 'geth' ETHEREUM_JSONRPC_HTTP_URL: http://host.docker.internal:8545/ DATABASE_URL: postgresql://postgres:@host.docker.internal:5432/blockscout?ssl=false - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 4472d2ef4b..5359ab6e62 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -15,8 +15,9 @@ services: depends_on: - db - redis_db - image: blockscout/blockscout:${DOCKER_TAG:-latest} - pull_policy: always + extends: + file: ./services/docker-compose-backend.yml + service: backend build: context: .. dockerfile: ./docker/Dockerfile @@ -29,24 +30,14 @@ services: CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: "" ADMIN_PANEL_ENABLED: "" RELEASE_VERSION: 5.2.3 - restart: always - stop_grace_period: 5m - container_name: 'backend' 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_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' - volumes: - - ./logs/:/app/logs/ visualizer: extends: diff --git a/docker-compose/envs/common-blockscout.env b/docker-compose/envs/common-blockscout.env index 581bc0cb62..bfeb0f74cb 100644 --- a/docker-compose/envs/common-blockscout.env +++ b/docker-compose/envs/common-blockscout.env @@ -38,7 +38,7 @@ EXCHANGE_RATES_COIN= # EXCHANGE_RATES_COINGECKO_API_KEY= # EXCHANGE_RATES_COINMARKETCAP_API_KEY= # EXCHANGE_RATES_COINMARKETCAP_COIN_ID= -POOL_SIZE=90 +POOL_SIZE=80 # EXCHANGE_RATES_COINGECKO_PLATFORM_ID= # TOKEN_EXCHANGE_RATE_INTERVAL= # TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL= diff --git a/docker-compose/services/docker-compose-backend.yml b/docker-compose/services/docker-compose-backend.yml new file mode 100644 index 0000000000..f73af4dab1 --- /dev/null +++ b/docker-compose/services/docker-compose-backend.yml @@ -0,0 +1,16 @@ +version: '3.8' + +services: + backend: + image: blockscout/blockscout:${DOCKER_TAG:-latest} + pull_policy: always + restart: always + stop_grace_period: 5m + container_name: 'backend' + 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 + volumes: + - ./logs/:/app/logs/ \ No newline at end of file diff --git a/docker/Makefile b/docker/Makefile index c01e2b0540..7e585865e9 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,818 +1,91 @@ -SYSTEM := $(shell uname -s) -HOST := host.docker.internal DOCKER_REPO := blockscout -APP_NAME := blockscout -BS_CONTAINER_IMAGE := $(DOCKER_REPO)/$(APP_NAME) -BS_CONTAINER_NAME := blockscout -PG_CONTAINER_IMAGE := postgres:14 -PG_CONTAINER_NAME := db -THIS_FILE = $(lastword $(MAKEFILE_LIST)) +BACKEND_APP_NAME := blockscout +FRONTEND_APP_NAME := frontend +BACKEND_CONTAINER_IMAGE := $(DOCKER_REPO)/$(BACKEND_APP_NAME) +BACKEND_CONTAINER_NAME := backend +FRONTEND_CONTAINER_NAME := frontend +VISUALIZER_CONTAINER_NAME := visualizer +SIG_PROVIDER_CONTAINER_NAME := sig-provider +STATS_CONTAINER_NAME := stats +STATS_DB_CONTAINER_NAME := stats-postgres +PROXY_CONTAINER_NAME := proxy +PG_CONTAINER_NAME := postgres RELEASE_VERSION ?= '5.2.3' -PORT ?= '4000' TAG := $(RELEASE_VERSION)-commit-$(shell git log -1 --pretty=format:"%h") STABLE_TAG := $(RELEASE_VERSION) -ifeq ($(SYSTEM), Linux) - HOST=localhost -endif - -ifdef DATABASE_URL - DB_URL = $(DATABASE_URL) +start: + @echo "==> Starting blockscout db" + @docker-compose -f ../docker-compose/services/docker-compose-db.yml up -d + @echo "==> Starting blockscout backend" + @docker-compose -f ../docker-compose/services/docker-compose-backend.yml up -d + @echo "==> Starting stats microservice" + @docker-compose -f ../docker-compose/services/docker-compose-stats.yml up -d + @echo "==> Starting visualizer microservice" + @docker-compose -f ../docker-compose/services/docker-compose-visualizer.yml up -d + @echo "==> Starting sig-provider microservice" + @docker-compose -f ../docker-compose/services/docker-compose-sig-provider.yml up -d + @echo "==> Starting blockscout frontend" + @docker-compose -f ../docker-compose/services/docker-compose-frontend.yml up -d + @echo "==> Starting Nginx proxy" + @docker-compose -f ../docker-compose/services/docker-compose-nginx.yml up -d + +BS_BACKEND_STARTED := $(shell docker ps --no-trunc --filter name=^/${BACKEND_CONTAINER_NAME}$ | grep ${BACKEND_CONTAINER_NAME}) +BS_FRONTEND_STARTED := $(shell docker ps --no-trunc --filter name=^/${FRONTEND_CONTAINER_NAME}$ | grep ${FRONTEND_CONTAINER_NAME}) +BS_STATS_STARTED := $(shell docker ps --no-trunc --filter name=^/${STATS_CONTAINER_NAME}$ | grep ${STATS_CONTAINER_NAME}) +BS_STATS_DB_STARTED := $(shell docker ps --no-trunc --filter name=^/${STATS_DB_CONTAINER_NAME}$ | grep ${STATS_DB_CONTAINER_NAME}) +BS_VISUALIZER_STARTED := $(shell docker ps --no-trunc --filter name=^/${VISUALIZER_CONTAINER_NAME}$ | grep ${VISUALIZER_CONTAINER_NAME}) +BS_SIG_PROVIDER_STARTED := $(shell docker ps --no-trunc --filter name=^/${SIG_PROVIDER_CONTAINER_NAME}$ | grep ${SIG_PROVIDER_CONTAINER_NAME}) +BS_PROXY_STARTED := $(shell docker ps --no-trunc --filter name=^/${PROXY_CONTAINER_NAME}$ | grep ${PROXY_CONTAINER_NAME}) +stop: +ifdef BS_FRONTEND_STARTED + @echo "==> Stopping Blockscout frontend container." + @docker stop $(FRONTEND_CONTAINER_NAME) && docker rm -f $(FRONTEND_CONTAINER_NAME) + @echo "==> Blockscout frontend container stopped." else - DB_URL = postgresql://postgres:@$(HOST):5432/blockscout?ssl=false - ECTO_USE_SSL = 'false' -endif -BLOCKSCOUT_CONTAINER_PARAMS = -e 'MIX_ENV=prod' \ - -e 'DATABASE_URL=$(DB_URL)' -ifeq ($(SYSTEM), Linux) - BLOCKSCOUT_CONTAINER_PARAMS += --network=host -endif -ifdef NETWORK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK=$(NETWORK)' -endif -ifdef SUBNETWORK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUBNETWORK=$(SUBNETWORK)' -endif -ifdef LOGO - BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO=$(LOGO)' -endif -ifdef ETHEREUM_JSONRPC_VARIANT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_VARIANT=$(ETHEREUM_JSONRPC_VARIANT)' -endif -ifdef ETHEREUM_JSONRPC_HTTP_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)' -endif -ifdef ETHEREUM_JSONRPC_FALLBACK_HTTP_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_FALLBACK_HTTP_URL=$(ETHEREUM_JSONRPC_FALLBACK_HTTP_URL)' -endif -ifdef ETHEREUM_JSONRPC_TRACE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRACE_URL=$(ETHEREUM_JSONRPC_TRACE_URL)' -endif -ifdef ETHEREUM_JSONRPC_FALLBACK_TRACE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_FALLBACK_TRACE_URL=$(ETHEREUM_JSONRPC_FALLBACK_TRACE_URL)' -endif -ifdef ETHEREUM_JSONRPC_WS_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_WS_URL=$(ETHEREUM_JSONRPC_WS_URL)' -endif -ifdef ETHEREUM_JSONRPC_TRANSPORT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRANSPORT=$(ETHEREUM_JSONRPC_TRANSPORT)' -endif -ifdef ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=$(ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES)' -endif -ifdef ETHEREUM_JSONRPC_HTTP_HEADERS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_HEADERS=$(ETHEREUM_JSONRPC_HTTP_HEADERS)' -endif -ifdef ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT=$(ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT)' -endif -ifdef IPC_PATH - BLOCKSCOUT_CONTAINER_PARAMS += -e 'IPC_PATH=$(IPC_PATH)' -endif -ifdef NETWORK_PATH - BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_PATH=$(NETWORK_PATH)' -endif -ifdef CHECK_ORIGIN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECK_ORIGIN=$(CHECK_ORIGIN)' -endif -ifdef COIN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN=$(COIN)' -endif -ifdef METADATA_CONTRACT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)' -endif -ifdef VALIDATORS_CONTRACT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'VALIDATORS_CONTRACT=$(VALIDATORS_CONTRACT)' -endif -ifdef KEYS_MANAGER_CONTRACT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'KEYS_MANAGER_CONTRACT=$(KEYS_MANAGER_CONTRACT)' -endif -ifdef SUPPLY_MODULE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPLY_MODULE=$(SUPPLY_MODULE)' -endif -ifdef POOL_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE=$(POOL_SIZE)' -endif -ifdef ECTO_USE_SSL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ECTO_USE_SSL=$(ECTO_USE_SSL)' -endif -ifdef DATADOG_HOST - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_HOST=$(DATADOG_HOST)' -endif -ifdef DATADOG_PORT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_PORT=$(DATADOG_PORT)' -endif -ifdef SPANDEX_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_BATCH_SIZE=$(SPANDEX_BATCH_SIZE)' -endif -ifdef SPANDEX_SYNC_THRESHOLD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_SYNC_THRESHOLD=$(SPANDEX_SYNC_THRESHOLD)' -endif -ifdef HEART_BEAT_TIMEOUT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_BEAT_TIMEOUT=$(HEART_BEAT_TIMEOUT)' -endif -ifdef HEART_COMMAND - BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_COMMAND=$(HEART_COMMAND)' -endif -ifdef BLOCKSCOUT_VERSION - BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_VERSION=$(BLOCKSCOUT_VERSION)' -endif -ifdef RELEASE_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RELEASE_LINK=$(RELEASE_LINK)' -endif -ifdef ELIXIR_VERSION - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ELIXIR_VERSION=$(ELIXIR_VERSION)' -endif -ifdef BLOCK_TRANSFORMER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_TRANSFORMER=$(BLOCK_TRANSFORMER)' -endif -ifdef GRAPHIQL_TRANSACTION - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GRAPHIQL_TRANSACTION=$(GRAPHIQL_TRANSACTION)' -endif -ifdef BLOCK_RANGES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_RANGES=$(BLOCK_RANGES)' -endif -ifdef FIRST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FIRST_BLOCK=$(FIRST_BLOCK)' -endif -ifdef LAST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'LAST_BLOCK=$(LAST_BLOCK)' -endif -ifdef TRACE_FIRST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TRACE_FIRST_BLOCK=$(TRACE_FIRST_BLOCK)' -endif -ifdef TRACE_LAST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TRACE_LAST_BLOCK=$(TRACE_LAST_BLOCK)' -endif -ifdef CACHE_TXS_COUNT_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TXS_COUNT_PERIOD=$(CACHE_TXS_COUNT_PERIOD)' -endif -ifdef CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=$(CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL)' -endif -ifdef SUPPORTED_CHAINS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPORTED_CHAINS=$(SUPPORTED_CHAINS)' -endif -ifdef CACHE_BLOCK_COUNT_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_BLOCK_COUNT_PERIOD=$(CACHE_BLOCK_COUNT_PERIOD)' -endif -ifdef CACHE_ADDRESS_SUM_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_SUM_PERIOD=$(CACHE_ADDRESS_SUM_PERIOD)' -endif -ifdef UNCLES_IN_AVERAGE_BLOCK_TIME - BLOCKSCOUT_CONTAINER_PARAMS += -e 'UNCLES_IN_AVERAGE_BLOCK_TIME=$(UNCLES_IN_AVERAGE_BLOCK_TIME)' -endif -ifdef CACHE_AVERAGE_BLOCK_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_AVERAGE_BLOCK_PERIOD=$(CACHE_AVERAGE_BLOCK_PERIOD)' -endif -ifdef CACHE_MARKET_HISTORY_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_MARKET_HISTORY_PERIOD=$(CACHE_MARKET_HISTORY_PERIOD)' -endif -ifdef DISABLE_WEBAPP - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_WEBAPP=$(DISABLE_WEBAPP)' -endif -ifdef API_V1_READ_METHODS_DISABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_V1_READ_METHODS_DISABLED=$(API_V1_READ_METHODS_DISABLED)' -endif -ifdef API_V1_WRITE_METHODS_DISABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_V1_WRITE_METHODS_DISABLED=$(API_V1_WRITE_METHODS_DISABLED)' -endif -ifdef DISABLE_INDEXER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_INDEXER=$(DISABLE_INDEXER)' -endif -ifdef DISABLE_REALTIME_INDEXER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_REALTIME_INDEXER=$(DISABLE_REALTIME_INDEXER)' -endif -ifdef INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER)' -endif -ifdef INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER)' -endif -ifdef INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER)' -endif -ifdef WEBAPP_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'WEBAPP_URL=$(WEBAPP_URL)' -endif -ifdef API_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_URL=$(API_URL)' -endif -ifdef CHAIN_SPEC_PATH - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHAIN_SPEC_PATH=$(CHAIN_SPEC_PATH)' -endif -ifdef EMISSION_FORMAT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EMISSION_FORMAT=$(EMISSION_FORMAT)' -endif -ifdef REWARDS_CONTRACT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'REWARDS_CONTRACT=$(REWARDS_CONTRACT)' -endif -ifdef SHOW_ADDRESS_MARKETCAP_PERCENTAGE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_ADDRESS_MARKETCAP_PERCENTAGE=$(SHOW_ADDRESS_MARKETCAP_PERCENTAGE)' -endif -ifdef BLOCKSCOUT_PROTOCOL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_PROTOCOL=$(BLOCKSCOUT_PROTOCOL)' -endif -ifdef BLOCKSCOUT_HOST - BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_HOST=$(BLOCKSCOUT_HOST)' -endif -ifdef DECOMPILED_SMART_CONTRACT_TOKEN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DECOMPILED_SMART_CONTRACT_TOKEN=$(DECOMPILED_SMART_CONTRACT_TOKEN)' -endif -ifdef CHECKSUM_ADDRESS_HASHES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECKSUM_ADDRESS_HASHES=$(CHECKSUM_ADDRESS_HASHES)' -endif -ifdef CHECKSUM_FUNCTION - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECKSUM_FUNCTION=$(CHECKSUM_FUNCTION)' -endif -ifdef EXCHANGE_RATES_COIN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COIN=$(EXCHANGE_RATES_COIN)' -endif -ifdef EXCHANGE_RATES_MARKET_CAP_SOURCE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_MARKET_CAP_SOURCE=$(EXCHANGE_RATES_MARKET_CAP_SOURCE)' -endif -ifdef EXCHANGE_RATES_PRICE_SOURCE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_PRICE_SOURCE=$(EXCHANGE_RATES_PRICE_SOURCE)' -endif -ifdef EXCHANGE_RATES_COINGECKO_COIN_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_COIN_ID=$(EXCHANGE_RATES_COINGECKO_COIN_ID)' -endif -ifdef EXCHANGE_RATES_COINGECKO_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_API_KEY=$(EXCHANGE_RATES_COINGECKO_API_KEY)' -endif -ifdef EXCHANGE_RATES_COINGECKO_PLATFORM_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_PLATFORM_ID=$(EXCHANGE_RATES_COINGECKO_PLATFORM_ID)' -endif -ifdef EXCHANGE_RATES_COINMARKETCAP_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINMARKETCAP_API_KEY=$(EXCHANGE_RATES_COINMARKETCAP_API_KEY)' -endif -ifdef EXCHANGE_RATES_COINMARKETCAP_COIN_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINMARKETCAP_COIN_ID=$(EXCHANGE_RATES_COINMARKETCAP_COIN_ID)' -endif -ifdef DISABLE_EXCHANGE_RATES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_EXCHANGE_RATES=$(DISABLE_EXCHANGE_RATES)' -endif -ifdef TOKEN_EXCHANGE_RATE_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_INTERVAL=$(TOKEN_EXCHANGE_RATE_INTERVAL)' -endif -ifdef TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL=$(TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL)' -endif -ifdef TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE=$(TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE)' -endif -ifdef DISABLE_TOKEN_EXCHANGE_RATE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_TOKEN_EXCHANGE_RATE=$(DISABLE_TOKEN_EXCHANGE_RATE)' -endif -ifdef SHOW_PRICE_CHART - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_PRICE_CHART=$(SHOW_PRICE_CHART)' -endif -ifdef SHOW_PRICE_CHART_LEGEND - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_PRICE_CHART_LEGEND=$(SHOW_PRICE_CHART_LEGEND)' -endif -ifdef SHOW_TXS_CHART - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TXS_CHART=$(SHOW_TXS_CHART)' -endif -ifdef TXS_HISTORIAN_INIT_LAG - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_HISTORIAN_INIT_LAG=$(TXS_HISTORIAN_INIT_LAG)' -endif -ifdef TXS_STATS_DAYS_TO_COMPILE_AT_INIT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_STATS_DAYS_TO_COMPILE_AT_INIT=$(TXS_STATS_DAYS_TO_COMPILE_AT_INIT)' -endif -ifdef APPS_MENU - BLOCKSCOUT_CONTAINER_PARAMS += -e 'APPS_MENU=$(APPS_MENU)' -endif -ifdef EXTERNAL_APPS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXTERNAL_APPS=$(EXTERNAL_APPS)' -endif -ifdef GAS_PRICE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE=$(GAS_PRICE)' -endif -ifdef GAS_PRICE_ORACLE_NUM_OF_BLOCKS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_NUM_OF_BLOCKS=$(GAS_PRICE_ORACLE_NUM_OF_BLOCKS)' -endif -ifdef GAS_PRICE_ORACLE_SAFELOW_PERCENTILE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_SAFELOW_PERCENTILE=$(GAS_PRICE_ORACLE_SAFELOW_PERCENTILE)' -endif -ifdef GAS_PRICE_ORACLE_AVERAGE_PERCENTILE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_AVERAGE_PERCENTILE=$(GAS_PRICE_ORACLE_AVERAGE_PERCENTILE)' -endif -ifdef GAS_PRICE_ORACLE_FAST_PERCENTILE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_FAST_PERCENTILE=$(GAS_PRICE_ORACLE_FAST_PERCENTILE)' -endif -ifdef GAS_PRICE_ORACLE_CACHE_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_CACHE_PERIOD=$(GAS_PRICE_ORACLE_CACHE_PERIOD)' -endif -ifdef TOKEN_METADATA_UPDATE_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_METADATA_UPDATE_INTERVAL=$(TOKEN_METADATA_UPDATE_INTERVAL)' -endif -ifdef RESTRICTED_LIST - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RESTRICTED_LIST=$(RESTRICTED_LIST)' -endif -ifdef RESTRICTED_LIST_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RESTRICTED_LIST_KEY=$(RESTRICTED_LIST_KEY)' -endif -ifdef CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD=$(CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD)' -endif -ifdef CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD=$(CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD)' -endif -ifdef CACHE_TOTAL_GAS_USAGE_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TOTAL_GAS_USAGE_PERIOD=$(CACHE_TOTAL_GAS_USAGE_PERIOD)' -endif -ifdef CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED=$(CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED)' -endif -ifdef DISABLE_LP_TOKENS_IN_MARKET_CAP - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_LP_TOKENS_IN_MARKET_CAP=$(DISABLE_LP_TOKENS_IN_MARKET_CAP)' -endif -ifdef HIDE_BLOCK_MINER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'HIDE_BLOCK_MINER=$(HIDE_BLOCK_MINER)' -endif -ifdef COIN_BALANCE_HISTORY_DAYS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_BALANCE_HISTORY_DAYS=$(COIN_BALANCE_HISTORY_DAYS)' -endif -ifdef CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD=$(CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD)' -endif -ifdef SHOW_MAINTENANCE_ALERT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_MAINTENANCE_ALERT=$(SHOW_MAINTENANCE_ALERT)' -endif -ifdef MAINTENANCE_ALERT_MESSAGE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MAINTENANCE_ALERT_MESSAGE=$(MAINTENANCE_ALERT_MESSAGE)' -endif -ifdef SOURCIFY_INTEGRATION_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_INTEGRATION_ENABLED=$(SOURCIFY_INTEGRATION_ENABLED)' -endif -ifdef SOURCIFY_SERVER_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_SERVER_URL=$(SOURCIFY_SERVER_URL)' -endif -ifdef SOURCIFY_REPO_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_REPO_URL=$(SOURCIFY_REPO_URL)' -endif -ifdef CHAIN_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHAIN_ID=$(CHAIN_ID)' -endif -ifdef JSON_RPC - BLOCKSCOUT_CONTAINER_PARAMS += -e 'JSON_RPC=$(JSON_RPC)' -endif -ifdef MAX_SIZE_UNLESS_HIDE_ARRAY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MAX_SIZE_UNLESS_HIDE_ARRAY=$(MAX_SIZE_UNLESS_HIDE_ARRAY)' -endif -ifdef DISPLAY_TOKEN_ICONS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISPLAY_TOKEN_ICONS=$(DISPLAY_TOKEN_ICONS)' -endif -ifdef SHOW_TENDERLY_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TENDERLY_LINK=$(SHOW_TENDERLY_LINK)' -endif -ifdef TENDERLY_CHAIN_PATH - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TENDERLY_CHAIN_PATH=$(TENDERLY_CHAIN_PATH)' -endif -ifdef RE_CAPTCHA_SECRET_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_SECRET_KEY=$(RE_CAPTCHA_SECRET_KEY)' -endif -ifdef RE_CAPTCHA_CLIENT_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_CLIENT_KEY=$(RE_CAPTCHA_CLIENT_KEY)' -endif -ifdef RE_CAPTCHA_V3_SECRET_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_V3_SECRET_KEY=$(RE_CAPTCHA_V3_SECRET_KEY)' -endif -ifdef RE_CAPTCHA_V3_CLIENT_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_V3_CLIENT_KEY=$(RE_CAPTCHA_V3_CLIENT_KEY)' -endif -ifdef RE_CAPTCHA_DISABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_DISABLED=$(RE_CAPTCHA_DISABLED)' -endif -ifdef CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD=$(CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD)' -endif -ifdef API_RATE_LIMIT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT=$(API_RATE_LIMIT)' -endif -ifdef API_RATE_LIMIT_BY_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_KEY=$(API_RATE_LIMIT_BY_KEY)' -endif -ifdef API_RATE_LIMIT_BY_WHITELISTED_IP - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_WHITELISTED_IP=$(API_RATE_LIMIT_BY_WHITELISTED_IP)' -endif -ifdef API_RATE_LIMIT_STATIC_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_STATIC_API_KEY=$(API_RATE_LIMIT_STATIC_API_KEY)' + @echo "==> Blockscout frontend container already stopped before." endif -ifdef API_RATE_LIMIT_WHITELISTED_IPS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_WHITELISTED_IPS=$(API_RATE_LIMIT_WHITELISTED_IPS)' -endif -ifdef API_RATE_LIMIT_DISABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_DISABLED=$(API_RATE_LIMIT_DISABLED)' -endif -ifdef API_RATE_LIMIT_HAMMER_REDIS_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_HAMMER_REDIS_URL=$(API_RATE_LIMIT_HAMMER_REDIS_URL)' -endif -ifdef API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY=$(API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY)' -endif -ifdef API_RATE_LIMIT_UI_V2_WITH_TOKEN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_UI_V2_WITH_TOKEN=$(API_RATE_LIMIT_UI_V2_WITH_TOKEN)' -endif -ifdef API_RATE_LIMIT_BY_IP - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_IP=$(API_RATE_LIMIT_BY_IP)' -endif -ifdef API_RATE_LIMIT_TIME_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_TIME_INTERVAL=$(API_RATE_LIMIT_TIME_INTERVAL)' -endif -ifdef API_RATE_LIMIT_BY_IP_TIME_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_IP_TIME_INTERVAL=$(API_RATE_LIMIT_BY_IP_TIME_INTERVAL)' -endif -ifdef API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS=$(API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS)' -endif -ifdef TOKEN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD=$(TOKEN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD)' -endif -ifdef COIN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD=$(COIN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD)' -endif -ifdef ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT=$(ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT)' -endif -ifdef ETHEREUM_JSONRPC_HTTP_TIMEOUT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_TIMEOUT=$(ETHEREUM_JSONRPC_HTTP_TIMEOUT)' -endif -ifdef FETCH_REWARDS_WAY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FETCH_REWARDS_WAY=$(FETCH_REWARDS_WAY)' -endif -ifdef FOOTER_LOGO - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_LOGO=$(FOOTER_LOGO)' -endif -ifdef FOOTER_CHAT_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_CHAT_LINK=$(FOOTER_CHAT_LINK)' -endif -ifdef FOOTER_GITHUB_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_GITHUB_LINK=$(FOOTER_GITHUB_LINK)' -endif -ifdef FOOTER_FORUM_LINK_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_FORUM_LINK_ENABLED=$(FOOTER_FORUM_LINK_ENABLED)' -endif -ifdef FOOTER_FORUM_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_FORUM_LINK=$(FOOTER_FORUM_LINK)' -endif -ifdef FOOTER_TELEGRAM_LINK_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_TELEGRAM_LINK_ENABLED=$(FOOTER_TELEGRAM_LINK_ENABLED)' -endif -ifdef FOOTER_TELEGRAM_LINK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_TELEGRAM_LINK=$(FOOTER_TELEGRAM_LINK)' -endif -ifdef FOOTER_LINK_TO_OTHER_EXPLORERS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_LINK_TO_OTHER_EXPLORERS=$(FOOTER_LINK_TO_OTHER_EXPLORERS)' -endif -ifdef FOOTER_OTHER_EXPLORERS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_OTHER_EXPLORERS=$(FOOTER_OTHER_EXPLORERS)' -endif -ifdef NETWORK_ICON - BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_ICON=$(NETWORK_ICON)' -endif -ifdef LOGO_TEXT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO_TEXT=$(LOGO_TEXT)' -endif -ifdef SHOW_TESTNET_LABEL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TESTNET_LABEL=$(SHOW_TESTNET_LABEL)' -endif -ifdef TESTNET_LABEL_TEXT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TESTNET_LABEL_TEXT=$(TESTNET_LABEL_TEXT)' -endif -ifdef CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST=$(CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST)' -endif -ifdef CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5 - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5=$(CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5)' -endif -ifdef CUSTOM_CONTRACT_ADDRESSES_CIRCLES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_CIRCLES=$(CUSTOM_CONTRACT_ADDRESSES_CIRCLES)' -endif -ifdef HEALTHY_BLOCKS_PERIOD - BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEALTHY_BLOCKS_PERIOD=$(HEALTHY_BLOCKS_PERIOD)' -endif -ifdef EXCHANGE_RATES_FETCH_BTC_VALUE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_FETCH_BTC_VALUE=$(EXCHANGE_RATES_FETCH_BTC_VALUE)' -endif -ifdef TXS_STATS_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_STATS_ENABLED=$(TXS_STATS_ENABLED)' -endif -ifdef INDEXER_MEMORY_LIMIT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_MEMORY_LIMIT=$(INDEXER_MEMORY_LIMIT)' -endif -ifdef INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER=$(INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER)' -endif -ifdef INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=$(INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER)' -endif -ifdef INDEXER_DISABLE_BLOCK_REWARD_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_BLOCK_REWARD_FETCHER=$(INDEXER_DISABLE_BLOCK_REWARD_FETCHER)' -endif -ifdef INDEXER_DISABLE_ADDRESS_COIN_BALANCE_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_ADDRESS_COIN_BALANCE_FETCHER=$(INDEXER_DISABLE_ADDRESS_COIN_BALANCE_FETCHER)' -endif -ifdef INDEXER_DISABLE_CATALOGED_TOKEN_UPDATER_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_CATALOGED_TOKEN_UPDATER_FETCHER=$(INDEXER_DISABLE_CATALOGED_TOKEN_UPDATER_FETCHER)' -endif -ifdef INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER=$(INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER)' -endif -ifdef INDEXER_CATCHUP_BLOCKS_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCKS_BATCH_SIZE=$(INDEXER_CATCHUP_BLOCKS_BATCH_SIZE)' -endif -ifdef INDEXER_CATCHUP_BLOCKS_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCKS_CONCURRENCY=$(INDEXER_CATCHUP_BLOCKS_CONCURRENCY)' -endif -ifdef INDEXER_CATCHUP_BLOCK_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCK_INTERVAL=$(INDEXER_CATCHUP_BLOCK_INTERVAL)' -endif -ifdef INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE=$(INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE)' -endif -ifdef INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY=$(INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY)' -endif -ifdef INDEXER_BLOCK_REWARD_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_BLOCK_REWARD_BATCH_SIZE=$(INDEXER_BLOCK_REWARD_BATCH_SIZE)' -endif -ifdef INDEXER_BLOCK_REWARD_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_BLOCK_REWARD_CONCURRENCY=$(INDEXER_BLOCK_REWARD_CONCURRENCY)' -endif -ifdef INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL=$(INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL)' -endif -ifdef INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY)' -endif -ifdef INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY)' -endif -ifdef INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY)' -endif -ifdef INDEXER_COIN_BALANCES_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_BATCH_SIZE=$(INDEXER_RECEIPTS_BATCH_SIZE)' -endif -ifdef INDEXER_COIN_BALANCES_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_CONCURRENCY=$(INDEXER_RECEIPTS_CONCURRENCY)' -endif -ifdef INDEXER_RECEIPTS_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_BATCH_SIZE=$(INDEXER_RECEIPTS_BATCH_SIZE)' -endif -ifdef INDEXER_RECEIPTS_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_CONCURRENCY=$(INDEXER_RECEIPTS_CONCURRENCY)' -endif -ifdef INDEXER_EMPTY_BLOCKS_SANITIZER_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_EMPTY_BLOCKS_SANITIZER_BATCH_SIZE=$(INDEXER_EMPTY_BLOCKS_SANITIZER_BATCH_SIZE)' -endif -ifdef INDEXER_TOKEN_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_CONCURRENCY=$(INDEXER_TOKEN_CONCURRENCY)' -endif -ifdef INDEXER_TOKEN_BALANCES_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_BATCH_SIZE=$(INDEXER_TOKEN_BALANCES_BATCH_SIZE)' -endif -ifdef INDEXER_TOKEN_BALANCES_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_CONCURRENCY=$(INDEXER_TOKEN_BALANCES_CONCURRENCY)' -endif -ifdef INDEXER_REALTIME_FETCHER_MAX_GAP - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_REALTIME_FETCHER_MAX_GAP=$(INDEXER_REALTIME_FETCHER_MAX_GAP)' -endif -ifdef INDEXER_FETCHER_INIT_QUERY_LIMIT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_FETCHER_INIT_QUERY_LIMIT=$(INDEXER_FETCHER_INIT_QUERY_LIMIT)' -endif -ifdef INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT=$(INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT)' -endif -ifdef INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE=$(INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE)' -endif -ifdef INDEXER_DISABLE_WITHDRAWALS_FETCHER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_WITHDRAWALS_FETCHER=$(INDEXER_DISABLE_WITHDRAWALS_FETCHER)' -endif -ifdef WITHDRAWALS_FIRST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'WITHDRAWALS_FIRST_BLOCK=$(WITHDRAWALS_FIRST_BLOCK)' -endif -ifdef TOKEN_ID_MIGRATION_FIRST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_FIRST_BLOCK=$(TOKEN_ID_MIGRATION_FIRST_BLOCK)' -endif -ifdef TOKEN_ID_MIGRATION_CONCURRENCY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_CONCURRENCY=$(TOKEN_ID_MIGRATION_CONCURRENCY)' -endif -ifdef TOKEN_ID_MIGRATION_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_BATCH_SIZE=$(TOKEN_ID_MIGRATION_BATCH_SIZE)' -endif -ifdef INDEXER_TX_ACTIONS_ENABLE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_ENABLE=$(INDEXER_TX_ACTIONS_ENABLE)' -endif -ifdef INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE=$(INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE)' -endif -ifdef INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK=$(INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK)' -endif -ifdef INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK=$(INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK)' -endif -ifdef INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS=$(INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS)' -endif -ifdef INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT=$(INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT)' -endif -ifdef SECRET_KEY_BASE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'SECRET_KEY_BASE=$(SECRET_KEY_BASE)' -endif -ifdef PORT - BLOCKSCOUT_CONTAINER_PARAMS += -e 'PORT=$(PORT)' -endif -ifdef DATABASE_READ_ONLY_API_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATABASE_READ_ONLY_API_URL=$(DATABASE_READ_ONLY_API_URL)' -endif -ifdef POOL_SIZE_API - BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_API=$(POOL_SIZE_API)' -endif -ifdef MICROSERVICE_SC_VERIFIER_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_ENABLED=$(MICROSERVICE_SC_VERIFIER_ENABLED)' -endif -ifdef MICROSERVICE_SC_VERIFIER_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_URL=$(MICROSERVICE_SC_VERIFIER_URL)' -endif -ifdef MICROSERVICE_SC_VERIFIER_TYPE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_TYPE=$(MICROSERVICE_SC_VERIFIER_TYPE)' -endif -ifdef MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS=$(MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS)' -endif -ifdef MICROSERVICE_VISUALIZE_SOL2UML_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_VISUALIZE_SOL2UML_ENABLED=$(MICROSERVICE_VISUALIZE_SOL2UML_ENABLED)' -endif -ifdef MICROSERVICE_VISUALIZE_SOL2UML_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_VISUALIZE_SOL2UML_URL=$(MICROSERVICE_VISUALIZE_SOL2UML_URL)' -endif -ifdef MICROSERVICE_SIG_PROVIDER_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SIG_PROVIDER_ENABLED=$(MICROSERVICE_SIG_PROVIDER_ENABLED)' -endif -ifdef MICROSERVICE_SIG_PROVIDER_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SIG_PROVIDER_URL=$(MICROSERVICE_SIG_PROVIDER_URL)' -endif -ifdef ACCOUNT_ENABLED - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_ENABLED=$(ACCOUNT_ENABLED)' -endif -ifdef ACCOUNT_REDIS_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_REDIS_URL=$(ACCOUNT_REDIS_URL)' -endif -ifdef COIN_NAME - BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)' -endif -ifdef ACCOUNT_AUTH0_DOMAIN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_DOMAIN=$(ACCOUNT_AUTH0_DOMAIN)' -endif -ifdef ACCOUNT_AUTH0_CLIENT_ID - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_ID=$(ACCOUNT_AUTH0_CLIENT_ID)' -endif -ifdef ACCOUNT_AUTH0_CLIENT_SECRET - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_SECRET=$(ACCOUNT_AUTH0_CLIENT_SECRET)' -endif -ifdef ACCOUNT_SENDGRID_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_API_KEY=$(ACCOUNT_SENDGRID_API_KEY)' -endif -ifdef ACCOUNT_SENDGRID_SENDER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_SENDER=$(ACCOUNT_SENDGRID_SENDER)' -endif -ifdef ACCOUNT_SENDGRID_TEMPLATE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_TEMPLATE=$(ACCOUNT_SENDGRID_TEMPLATE)' -endif -ifdef ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL)' -endif -ifdef ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY)' -endif -ifdef ACCOUNT_DATABASE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_DATABASE_URL=$(ACCOUNT_DATABASE_URL)' -endif -ifdef ACCOUNT_POOL_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_POOL_SIZE=$(ACCOUNT_POOL_SIZE)' -endif -ifdef ACCOUNT_CLOAK_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)' -endif -ifdef MIXPANEL_TOKEN - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MIXPANEL_TOKEN=$(MIXPANEL_TOKEN)' -endif -ifdef MIXPANEL_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'MIXPANEL_URL=$(MIXPANEL_URL)' -endif -ifdef AMPLITUDE_API_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AMPLITUDE_API_KEY=$(AMPLITUDE_API_KEY)' -endif -ifdef AMPLITUDE_URL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'AMPLITUDE_URL=$(AMPLITUDE_URL)' -endif -ifdef DECODE_NOT_A_CONTRACT_CALLS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'DECODE_NOT_A_CONTRACT_CALLS=$(DECODE_NOT_A_CONTRACT_CALLS)' -endif -ifdef CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS=$(CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS)' -endif -ifdef CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS=$(CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS)' -endif -ifdef CONTRACT_VERIFICATION_MAX_LIBRARIES - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_MAX_LIBRARIES=$(CONTRACT_VERIFICATION_MAX_LIBRARIES)' -endif -ifdef CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING=$(CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING)' -endif -ifdef CONTRACT_DISABLE_INTERACTION - BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_DISABLE_INTERACTION=$(CONTRACT_DISABLE_INTERACTION)' -endif -ifdef EIP_1559_ELASTICITY_MULTIPLIER - BLOCKSCOUT_CONTAINER_PARAMS += -e 'EIP_1559_ELASTICITY_MULTIPLIER=$(EIP_1559_ELASTICITY_MULTIPLIER)' -endif -ifdef API_SENSITIVE_ENDPOINTS_KEY - BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_SENSITIVE_ENDPOINTS_KEY=$(API_SENSITIVE_ENDPOINTS_KEY)' -endif -ifdef ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL - BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL=$(ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL)' -endif -ifdef INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE)' -endif -ifdef INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE)' -endif -ifdef INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE - BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE)' -endif - -HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep -sw "${BS_CONTAINER_IMAGE} ") -build: - @echo "==> Checking for blockscout image $(BS_CONTAINER_IMAGE)" -ifdef HAS_BLOCKSCOUT_IMAGE - @echo "==> Image exist. Using $(BS_CONTAINER_IMAGE)" +ifdef BS_BACKEND_STARTED + @echo "==> Stopping Blockscout backend container." + @docker stop $(BACKEND_CONTAINER_NAME) && docker rm -f $(BACKEND_CONTAINER_NAME) + @echo "==> Blockscout backend container stopped." else - @echo "==> No image found, trying to build one..." - @docker build -f ./Dockerfile --build-arg RELEASE_VERSION=$(RELEASE_VERSION) -t $(BS_CONTAINER_IMAGE) ../ + @echo "==> Blockscout backend container already stopped before." endif - -migrate_only: - @echo "==> Running migrations" - @docker run --rm \ - $(BLOCKSCOUT_CONTAINER_PARAMS) \ - $(BS_CONTAINER_IMAGE) /bin/sh -c "echo $$MIX_ENV && ./bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\"" - -migrate: build postgres - @$(MAKE) -f $(THIS_FILE) migrate_only - -PG_EXIST := $(shell docker ps -a --no-trunc --filter name=^/${PG_CONTAINER_NAME}$ | grep ${PG_CONTAINER_NAME}) -PG_STARTED := $(shell docker ps --no-trunc --filter name=^/${PG_CONTAINER_NAME}$ | grep ${PG_CONTAINER_NAME}) - -postgres: -ifdef DATABASE_URL - @echo "==> DATABASE_URL of external DB provided. There is no need to start a container for DB." - @$(MAKE) -f $(THIS_FILE) migrate_only +ifdef BS_STATS_DB_STARTED + @echo "==> Stopping Blockscout stats db container." + @docker stop $(STATS_DB_CONTAINER_NAME) && docker rm -f $(STATS_DB_CONTAINER_NAME) + @echo "==> Blockscout stats db container stopped." else -ifdef PG_EXIST - @echo "==> Checking PostrgeSQL container" -ifdef PG_STARTED - @echo "==> PostgreSQL Already started" - @$(MAKE) -f $(THIS_FILE) migrate_only + @echo "==> Blockscout stats db container already stopped before." +endif +ifdef BS_STATS_STARTED + @echo "==> Stopping Blockscout stats container." + @docker stop $(STATS_CONTAINER_NAME) && docker rm -f $(STATS_CONTAINER_NAME) + @echo "==> Blockscout stats container stopped." else - @echo "==> Starting PostgreSQL container" - @docker start $(PG_CONTAINER_NAME) - @$(MAKE) -f $(THIS_FILE) migrate_only + @echo "==> Blockscout stats container already stopped before." endif +ifdef BS_VISUALIZER_STARTED + @echo "==> Stopping Blockscout visualizer container." + @docker stop $(VISUALIZER_CONTAINER_NAME) && docker rm -f $(VISUALIZER_CONTAINER_NAME) + @echo "==> Blockscout visualizer container stopped." else - @echo "==> Creating new PostgreSQL container" - @docker run -d --name $(PG_CONTAINER_NAME) \ - -e POSTGRES_PASSWORD="" \ - -e POSTGRES_USER="postgres" \ - -e POSTGRES_HOST_AUTH_METHOD="trust" \ - -p 5432:5432 \ - $(PG_CONTAINER_IMAGE) - @sleep 1 - @$(MAKE) -f $(THIS_FILE) migrate_only + @echo "==> Blockscout visualizer container already stopped before." endif +ifdef BS_SIG_PROVIDER_STARTED + @echo "==> Stopping Blockscout sig-provider container." + @docker stop $(SIG_PROVIDER_CONTAINER_NAME) && docker rm -f $(SIG_PROVIDER_CONTAINER_NAME) + @echo "==> Blockscout sig-provider container stopped." +else + @echo "==> Blockscout sig-provider container already stopped before." endif - -start: build postgres - @echo "==> Starting blockscout" - @docker run --rm --name $(BS_CONTAINER_NAME) \ - $(BLOCKSCOUT_CONTAINER_PARAMS) \ - -p 4000:4000 \ - $(BS_CONTAINER_IMAGE) /bin/sh -c "./bin/blockscout start" - -BS_STARTED := $(shell docker ps --no-trunc --filter name=^/${BS_CONTAINER_NAME}$ | grep ${BS_CONTAINER_NAME}) -stop: -ifdef BS_STARTED - @echo "==> Stopping BlockScout container." - @docker stop $(BS_CONTAINER_NAME) - @echo "==> BlockScout container stopped." +ifdef BS_PROXY_STARTED + @echo "==> Stopping Nginx proxy container." + @docker stop $(PROXY_CONTAINER_NAME) && docker rm -f $(PROXY_CONTAINER_NAME) + @echo "==> Nginx proxy container stopped." else - @echo "==> BlockScout container already stopped before." + @echo "==> Nginx proxy container already stopped before." endif ifdef PG_STARTED @echo "==> Stopping Postgres container." @@ -837,15 +110,15 @@ publish-stable: docker-login publish-latest publish-stable-version ## publish th publish-latest: tag-latest ## publish the `latest` tagged container to hub @echo 'publish latest to $(DOCKER_REPO)' - docker push $(BS_CONTAINER_IMAGE):latest + docker push $(BACKEND_CONTAINER_IMAGE):latest publish-version: tag-version ## publish the `{version}` tagged container to hub @echo 'publish $(TAG) to $(DOCKER_REPO)' - docker push $(BS_CONTAINER_IMAGE):$(TAG) + docker push $(BACKEND_CONTAINER_IMAGE):$(TAG) publish-stable-version: tag-stable-version ## publish the `{version}` tagged container to hub @echo 'publish $(STABLE_TAG) to $(DOCKER_REPO)' - docker push $(BS_CONTAINER_IMAGE):$(STABLE_TAG) + docker push $(BACKEND_CONTAINER_IMAGE):$(STABLE_TAG) # Docker tagging tag: tag-latest tag-version ## Generate container tags for the `{version}` ans `latest` tags @@ -853,21 +126,19 @@ tag-stable: tag-latest tag-stable-version ## Generate container tags for the `{v tag-latest: ## Generate container `latest` tag @echo 'create latest tag' - docker tag $(BS_CONTAINER_IMAGE) $(BS_CONTAINER_IMAGE):latest + docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):latest tag-version: ## Generate container `{version}` tag @echo 'create tag $(TAG)' - docker tag $(BS_CONTAINER_IMAGE) $(BS_CONTAINER_IMAGE):$(TAG) + docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):$(TAG) tag-stable-version: ## Generate container `{version}` tag @echo 'create tag $(STABLE_TAG)' - docker tag $(BS_CONTAINER_IMAGE) $(BS_CONTAINER_IMAGE):$(STABLE_TAG) + docker tag $(BACKEND_CONTAINER_IMAGE) $(BACKEND_CONTAINER_IMAGE):$(STABLE_TAG) .PHONY: build \ - migrate \ start \ stop \ - postgres \ run \ docker-login \ release \