@ -1,818 +1,91 @@
SYSTEM := $( shell uname -s)
HOST := host.docker.internal
DOCKER_REPO := blockscout
DOCKER_REPO := blockscout
APP_NAME := blockscout
BACKEND_APP_NAME := blockscout
BS_CONTAINER_IMAGE := $( DOCKER_REPO) /$( APP_NAME)
FRONTEND_APP_NAME := frontend
BS_CONTAINER_NAME := blockscout
BACKEND_CONTAINER_IMAGE := $( DOCKER_REPO) /$( BACKEND_APP_NAME)
PG_CONTAINER_IMAGE := postgres:14
BACKEND_CONTAINER_NAME := backend
PG_CONTAINER_NAME := db
FRONTEND_CONTAINER_NAME := frontend
THIS_FILE = $( lastword $( MAKEFILE_LIST) )
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'
RELEASE_VERSION ?= '5.2.3'
PORT ?= '4000'
TAG := $( RELEASE_VERSION) -commit-$( shell git log -1 --pretty= format:"%h" )
TAG := $( RELEASE_VERSION) -commit-$( shell git log -1 --pretty= format:"%h" )
STABLE_TAG := $( RELEASE_VERSION)
STABLE_TAG := $( RELEASE_VERSION)
i f e q ( $( SYSTEM ) , L i n u x )
start :
HOST = localhost
@echo "==> Starting blockscout db"
e n d i f
@docker-compose -f ../docker-compose/services/docker-compose-db.yml up -d
@echo "==> Starting blockscout backend"
i f d e f D A T A B A S E _ U R L
@docker-compose -f ../docker-compose/services/docker-compose-backend.yml up -d
DB_URL = $( DATABASE_URL)
@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 :
i f d e f B S _ F R O N T E N D _ S T A R T E D
@echo "==> Stopping Blockscout frontend container."
@docker stop $( FRONTEND_CONTAINER_NAME) && docker rm -f $( FRONTEND_CONTAINER_NAME)
@echo "==> Blockscout frontend container stopped."
e l s e
e l s e
DB_URL = postgresql://postgres:@$( HOST) :5432/blockscout?ssl= false
@echo "==> Blockscout frontend container already stopped before."
ECTO_USE_SSL = 'false'
e n d i f
BLOCKSCOUT_CONTAINER_PARAMS = -e 'MIX_ENV=prod' \
-e 'DATABASE_URL=$(DB_URL)'
i f e q ( $( SYSTEM ) , L i n u x )
BLOCKSCOUT_CONTAINER_PARAMS += --network= host
e n d i f
i f d e f N E T W O R K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK=$(NETWORK)'
e n d i f
i f d e f S U B N E T W O R K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUBNETWORK=$(SUBNETWORK)'
e n d i f
i f d e f L O G O
BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO=$(LOGO)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ V A R I A N T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_VARIANT=$(ETHEREUM_JSONRPC_VARIANT)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ H T T P _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ F A L L B A C K _ H T T P _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_FALLBACK_HTTP_URL=$(ETHEREUM_JSONRPC_FALLBACK_HTTP_URL)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ T R A C E _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRACE_URL=$(ETHEREUM_JSONRPC_TRACE_URL)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ F A L L B A C K _ T R A C E _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_FALLBACK_TRACE_URL=$(ETHEREUM_JSONRPC_FALLBACK_TRACE_URL)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ W S _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_WS_URL=$(ETHEREUM_JSONRPC_WS_URL)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ T R A N S P O R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRANSPORT=$(ETHEREUM_JSONRPC_TRANSPORT)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ D I S A B L E _ A R C H I V E _ B A L A N C E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES=$(ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ H T T P _ H E A D E R S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_HEADERS=$(ETHEREUM_JSONRPC_HTTP_HEADERS)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ W A I T _ P E R _ T I M E O U T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT=$(ETHEREUM_JSONRPC_WAIT_PER_TIMEOUT)'
e n d i f
i f d e f I P C _ P A T H
BLOCKSCOUT_CONTAINER_PARAMS += -e 'IPC_PATH=$(IPC_PATH)'
e n d i f
i f d e f N E T W O R K _ P A T H
BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_PATH=$(NETWORK_PATH)'
e n d i f
i f d e f C H E C K _ O R I G I N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECK_ORIGIN=$(CHECK_ORIGIN)'
e n d i f
i f d e f C O I N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN=$(COIN)'
e n d i f
i f d e f M E T A D A T A _ C O N T R A C T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)'
e n d i f
i f d e f V A L I D A T O R S _ C O N T R A C T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'VALIDATORS_CONTRACT=$(VALIDATORS_CONTRACT)'
e n d i f
i f d e f K E Y S _ M A N A G E R _ C O N T R A C T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'KEYS_MANAGER_CONTRACT=$(KEYS_MANAGER_CONTRACT)'
e n d i f
i f d e f S U P P L Y _ M O D U L E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPLY_MODULE=$(SUPPLY_MODULE)'
e n d i f
i f d e f P O O L _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE=$(POOL_SIZE)'
e n d i f
i f d e f E C T O _ U S E _ S S L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ECTO_USE_SSL=$(ECTO_USE_SSL)'
e n d i f
i f d e f D A T A D O G _ H O S T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_HOST=$(DATADOG_HOST)'
e n d i f
i f d e f D A T A D O G _ P O R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_PORT=$(DATADOG_PORT)'
e n d i f
i f d e f S P A N D E X _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_BATCH_SIZE=$(SPANDEX_BATCH_SIZE)'
e n d i f
i f d e f S P A N D E X _ S Y N C _ T H R E S H O L D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_SYNC_THRESHOLD=$(SPANDEX_SYNC_THRESHOLD)'
e n d i f
i f d e f H E A R T _ B E A T _ T I M E O U T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_BEAT_TIMEOUT=$(HEART_BEAT_TIMEOUT)'
e n d i f
i f d e f H E A R T _ C O M M A N D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_COMMAND=$(HEART_COMMAND)'
e n d i f
i f d e f B L O C K S C O U T _ V E R S I O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_VERSION=$(BLOCKSCOUT_VERSION)'
e n d i f
i f d e f R E L E A S E _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RELEASE_LINK=$(RELEASE_LINK)'
e n d i f
i f d e f E L I X I R _ V E R S I O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ELIXIR_VERSION=$(ELIXIR_VERSION)'
e n d i f
i f d e f B L O C K _ T R A N S F O R M E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_TRANSFORMER=$(BLOCK_TRANSFORMER)'
e n d i f
i f d e f G R A P H I Q L _ T R A N S A C T I O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GRAPHIQL_TRANSACTION=$(GRAPHIQL_TRANSACTION)'
e n d i f
i f d e f B L O C K _ R A N G E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_RANGES=$(BLOCK_RANGES)'
e n d i f
i f d e f F I R S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FIRST_BLOCK=$(FIRST_BLOCK)'
e n d i f
i f d e f L A S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'LAST_BLOCK=$(LAST_BLOCK)'
e n d i f
i f d e f T R A C E _ F I R S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TRACE_FIRST_BLOCK=$(TRACE_FIRST_BLOCK)'
e n d i f
i f d e f T R A C E _ L A S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TRACE_LAST_BLOCK=$(TRACE_LAST_BLOCK)'
e n d i f
i f d e f C A C H E _ T X S _ C O U N T _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TXS_COUNT_PERIOD=$(CACHE_TXS_COUNT_PERIOD)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ W I T H _ B A L A N C E S _ U P D A T E _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=$(CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL)'
e n d i f
i f d e f S U P P O R T E D _ C H A I N S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPORTED_CHAINS=$(SUPPORTED_CHAINS)'
e n d i f
i f d e f C A C H E _ B L O C K _ C O U N T _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_BLOCK_COUNT_PERIOD=$(CACHE_BLOCK_COUNT_PERIOD)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ S U M _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_SUM_PERIOD=$(CACHE_ADDRESS_SUM_PERIOD)'
e n d i f
i f d e f U N C L E S _ I N _ A V E R A G E _ B L O C K _ T I M E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'UNCLES_IN_AVERAGE_BLOCK_TIME=$(UNCLES_IN_AVERAGE_BLOCK_TIME)'
e n d i f
i f d e f C A C H E _ A V E R A G E _ B L O C K _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_AVERAGE_BLOCK_PERIOD=$(CACHE_AVERAGE_BLOCK_PERIOD)'
e n d i f
i f d e f C A C H E _ M A R K E T _ H I S T O R Y _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_MARKET_HISTORY_PERIOD=$(CACHE_MARKET_HISTORY_PERIOD)'
e n d i f
i f d e f D I S A B L E _ W E B A P P
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_WEBAPP=$(DISABLE_WEBAPP)'
e n d i f
i f d e f A P I _ V 1 _ R E A D _ M E T H O D S _ D I S A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_V1_READ_METHODS_DISABLED=$(API_V1_READ_METHODS_DISABLED)'
e n d i f
i f d e f A P I _ V 1 _ W R I T E _ M E T H O D S _ D I S A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_V1_WRITE_METHODS_DISABLED=$(API_V1_WRITE_METHODS_DISABLED)'
e n d i f
i f d e f D I S A B L E _ I N D E X E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_INDEXER=$(DISABLE_INDEXER)'
e n d i f
i f d e f D I S A B L E _ R E A L T I M E _ I N D E X E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_REALTIME_INDEXER=$(DISABLE_REALTIME_INDEXER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ T O K E N _ I N S T A N C E _ R E A L T I M E _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ T O K E N _ I N S T A N C E _ R E T R Y _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ T O K E N _ I N S T A N C E _ S A N I T I Z E _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER=$(INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER)'
e n d i f
i f d e f W E B A P P _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'WEBAPP_URL=$(WEBAPP_URL)'
e n d i f
i f d e f A P I _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_URL=$(API_URL)'
e n d i f
i f d e f C H A I N _ S P E C _ P A T H
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHAIN_SPEC_PATH=$(CHAIN_SPEC_PATH)'
e n d i f
i f d e f E M I S S I O N _ F O R M A T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EMISSION_FORMAT=$(EMISSION_FORMAT)'
e n d i f
i f d e f R E W A R D S _ C O N T R A C T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'REWARDS_CONTRACT=$(REWARDS_CONTRACT)'
e n d i f
i f d e f S H O W _ A D D R E S S _ M A R K E T C A P _ P E R C E N T A G E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_ADDRESS_MARKETCAP_PERCENTAGE=$(SHOW_ADDRESS_MARKETCAP_PERCENTAGE)'
e n d i f
i f d e f B L O C K S C O U T _ P R O T O C O L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_PROTOCOL=$(BLOCKSCOUT_PROTOCOL)'
e n d i f
i f d e f B L O C K S C O U T _ H O S T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_HOST=$(BLOCKSCOUT_HOST)'
e n d i f
i f d e f D E C O M P I L E D _ S M A R T _ C O N T R A C T _ T O K E N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DECOMPILED_SMART_CONTRACT_TOKEN=$(DECOMPILED_SMART_CONTRACT_TOKEN)'
e n d i f
i f d e f C H E C K S U M _ A D D R E S S _ H A S H E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECKSUM_ADDRESS_HASHES=$(CHECKSUM_ADDRESS_HASHES)'
e n d i f
i f d e f C H E C K S U M _ F U N C T I O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECKSUM_FUNCTION=$(CHECKSUM_FUNCTION)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COIN=$(EXCHANGE_RATES_COIN)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ M A R K E T _ C A P _ S O U R C E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_MARKET_CAP_SOURCE=$(EXCHANGE_RATES_MARKET_CAP_SOURCE)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ P R I C E _ S O U R C E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_PRICE_SOURCE=$(EXCHANGE_RATES_PRICE_SOURCE)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N G E C K O _ C O I N _ I D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_COIN_ID=$(EXCHANGE_RATES_COINGECKO_COIN_ID)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N G E C K O _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_API_KEY=$(EXCHANGE_RATES_COINGECKO_API_KEY)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N G E C K O _ P L A T F O R M _ I D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINGECKO_PLATFORM_ID=$(EXCHANGE_RATES_COINGECKO_PLATFORM_ID)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N M A R K E T C A P _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINMARKETCAP_API_KEY=$(EXCHANGE_RATES_COINMARKETCAP_API_KEY)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ C O I N M A R K E T C A P _ C O I N _ I D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_COINMARKETCAP_COIN_ID=$(EXCHANGE_RATES_COINMARKETCAP_COIN_ID)'
e n d i f
i f d e f D I S A B L E _ E X C H A N G E _ R A T E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_EXCHANGE_RATES=$(DISABLE_EXCHANGE_RATES)'
e n d i f
i f d e f T O K E N _ E X C H A N G E _ R A T E _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_INTERVAL=$(TOKEN_EXCHANGE_RATE_INTERVAL)'
e n d i f
i f d e f T O K E N _ E X C H A N G E _ R A T E _ R E F E T C H _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL=$(TOKEN_EXCHANGE_RATE_REFETCH_INTERVAL)'
e n d i f
i f d e f T O K E N _ E X C H A N G E _ R A T E _ M A X _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE=$(TOKEN_EXCHANGE_RATE_MAX_BATCH_SIZE)'
e n d i f
i f d e f D I S A B L E _ T O K E N _ E X C H A N G E _ R A T E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_TOKEN_EXCHANGE_RATE=$(DISABLE_TOKEN_EXCHANGE_RATE)'
e n d i f
i f d e f S H O W _ P R I C E _ C H A R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_PRICE_CHART=$(SHOW_PRICE_CHART)'
e n d i f
i f d e f S H O W _ P R I C E _ C H A R T _ L E G E N D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_PRICE_CHART_LEGEND=$(SHOW_PRICE_CHART_LEGEND)'
e n d i f
i f d e f S H O W _ T X S _ C H A R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TXS_CHART=$(SHOW_TXS_CHART)'
e n d i f
i f d e f T X S _ H I S T O R I A N _ I N I T _ L A G
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_HISTORIAN_INIT_LAG=$(TXS_HISTORIAN_INIT_LAG)'
e n d i f
i f d e f T X S _ S T A T S _ D A Y S _ T O _ C O M P I L E _ A T _ I N I T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_STATS_DAYS_TO_COMPILE_AT_INIT=$(TXS_STATS_DAYS_TO_COMPILE_AT_INIT)'
e n d i f
i f d e f A P P S _ M E N U
BLOCKSCOUT_CONTAINER_PARAMS += -e 'APPS_MENU=$(APPS_MENU)'
e n d i f
i f d e f E X T E R N A L _ A P P S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXTERNAL_APPS=$(EXTERNAL_APPS)'
e n d i f
i f d e f G A S _ P R I C E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE=$(GAS_PRICE)'
e n d i f
i f d e f G A S _ P R I C E _ O R A C L E _ N U M _ O F _ B L O C K S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_NUM_OF_BLOCKS=$(GAS_PRICE_ORACLE_NUM_OF_BLOCKS)'
e n d i f
i f d e f G A S _ P R I C E _ O R A C L E _ S A F E L O W _ P E R C E N T I L E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_SAFELOW_PERCENTILE=$(GAS_PRICE_ORACLE_SAFELOW_PERCENTILE)'
e n d i f
i f d e f G A S _ P R I C E _ O R A C L E _ A V E R A G E _ P E R C E N T I L E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_AVERAGE_PERCENTILE=$(GAS_PRICE_ORACLE_AVERAGE_PERCENTILE)'
e n d i f
i f d e f G A S _ P R I C E _ O R A C L E _ F A S T _ P E R C E N T I L E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_FAST_PERCENTILE=$(GAS_PRICE_ORACLE_FAST_PERCENTILE)'
e n d i f
i f d e f G A S _ P R I C E _ O R A C L E _ C A C H E _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'GAS_PRICE_ORACLE_CACHE_PERIOD=$(GAS_PRICE_ORACLE_CACHE_PERIOD)'
e n d i f
i f d e f T O K E N _ M E T A D A T A _ U P D A T E _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_METADATA_UPDATE_INTERVAL=$(TOKEN_METADATA_UPDATE_INTERVAL)'
e n d i f
i f d e f R E S T R I C T E D _ L I S T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RESTRICTED_LIST=$(RESTRICTED_LIST)'
e n d i f
i f d e f R E S T R I C T E D _ L I S T _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RESTRICTED_LIST_KEY=$(RESTRICTED_LIST_KEY)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ T R A N S A C T I O N S _ C O U N T E R _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD=$(CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ T R A N S A C T I O N S _ G A S _ U S A G E _ C O U N T E R _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD=$(CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD)'
e n d i f
i f d e f C A C H E _ T O T A L _ G A S _ U S A G E _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TOTAL_GAS_USAGE_PERIOD=$(CACHE_TOTAL_GAS_USAGE_PERIOD)'
e n d i f
i f d e f C A C H E _ T O T A L _ G A S _ U S A G E _ C O U N T E R _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED=$(CACHE_TOTAL_GAS_USAGE_COUNTER_ENABLED)'
e n d i f
i f d e f D I S A B L E _ L P _ T O K E N S _ I N _ M A R K E T _ C A P
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_LP_TOKENS_IN_MARKET_CAP=$(DISABLE_LP_TOKENS_IN_MARKET_CAP)'
e n d i f
i f d e f H I D E _ B L O C K _ M I N E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'HIDE_BLOCK_MINER=$(HIDE_BLOCK_MINER)'
e n d i f
i f d e f C O I N _ B A L A N C E _ H I S T O R Y _ D A Y S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_BALANCE_HISTORY_DAYS=$(COIN_BALANCE_HISTORY_DAYS)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ T O K E N S _ U S D _ S U M _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD=$(CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD)'
e n d i f
i f d e f S H O W _ M A I N T E N A N C E _ A L E R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_MAINTENANCE_ALERT=$(SHOW_MAINTENANCE_ALERT)'
e n d i f
i f d e f M A I N T E N A N C E _ A L E R T _ M E S S A G E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MAINTENANCE_ALERT_MESSAGE=$(MAINTENANCE_ALERT_MESSAGE)'
e n d i f
i f d e f S O U R C I F Y _ I N T E G R A T I O N _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_INTEGRATION_ENABLED=$(SOURCIFY_INTEGRATION_ENABLED)'
e n d i f
i f d e f S O U R C I F Y _ S E R V E R _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_SERVER_URL=$(SOURCIFY_SERVER_URL)'
e n d i f
i f d e f S O U R C I F Y _ R E P O _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCIFY_REPO_URL=$(SOURCIFY_REPO_URL)'
e n d i f
i f d e f C H A I N _ I D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHAIN_ID=$(CHAIN_ID)'
e n d i f
i f d e f J S O N _ R P C
BLOCKSCOUT_CONTAINER_PARAMS += -e 'JSON_RPC=$(JSON_RPC)'
e n d i f
i f d e f M A X _ S I Z E _ U N L E S S _ H I D E _ A R R A Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MAX_SIZE_UNLESS_HIDE_ARRAY=$(MAX_SIZE_UNLESS_HIDE_ARRAY)'
e n d i f
i f d e f D I S P L A Y _ T O K E N _ I C O N S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISPLAY_TOKEN_ICONS=$(DISPLAY_TOKEN_ICONS)'
e n d i f
i f d e f S H O W _ T E N D E R L Y _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TENDERLY_LINK=$(SHOW_TENDERLY_LINK)'
e n d i f
i f d e f T E N D E R L Y _ C H A I N _ P A T H
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TENDERLY_CHAIN_PATH=$(TENDERLY_CHAIN_PATH)'
e n d i f
i f d e f R E _ C A P T C H A _ S E C R E T _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_SECRET_KEY=$(RE_CAPTCHA_SECRET_KEY)'
e n d i f
i f d e f R E _ C A P T C H A _ C L I E N T _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_CLIENT_KEY=$(RE_CAPTCHA_CLIENT_KEY)'
e n d i f
i f d e f R E _ C A P T C H A _ V 3 _ S E C R E T _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_V3_SECRET_KEY=$(RE_CAPTCHA_V3_SECRET_KEY)'
e n d i f
i f d e f R E _ C A P T C H A _ V 3 _ C L I E N T _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_V3_CLIENT_KEY=$(RE_CAPTCHA_V3_CLIENT_KEY)'
e n d i f
i f d e f R E _ C A P T C H A _ D I S A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'RE_CAPTCHA_DISABLED=$(RE_CAPTCHA_DISABLED)'
e n d i f
i f d e f C A C H E _ A D D R E S S _ T O K E N _ T R A N S F E R S _ C O U N T E R _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD=$(CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT=$(API_RATE_LIMIT)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ B Y _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_KEY=$(API_RATE_LIMIT_BY_KEY)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ B Y _ W H I T E L I S T E D _ I P
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_WHITELISTED_IP=$(API_RATE_LIMIT_BY_WHITELISTED_IP)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ S T A T I C _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_STATIC_API_KEY=$(API_RATE_LIMIT_STATIC_API_KEY)'
e n d i f
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ W H I T E L I S T E D _ I P S
i f d e f B S _ B A C K E N D _ S T A R T E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_WHITELISTED_IPS=$(API_RATE_LIMIT_WHITELISTED_IPS)'
@echo "==> Stopping Blockscout backend container."
e n d i f
@docker stop $( BACKEND_CONTAINER_NAME) && docker rm -f $( BACKEND_CONTAINER_NAME)
i f d e f A P I _ R A T E _ L I M I T _ D I S A B L E D
@echo "==> Blockscout backend container stopped."
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_DISABLED=$(API_RATE_LIMIT_DISABLED)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ H A M M E R _ R E D I S _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_HAMMER_REDIS_URL=$(API_RATE_LIMIT_HAMMER_REDIS_URL)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ I S _ B L O C K S C O U T _ B E H I N D _ P R O X Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY=$(API_RATE_LIMIT_IS_BLOCKSCOUT_BEHIND_PROXY)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ U I _ V 2 _ W I T H _ T O K E N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_UI_V2_WITH_TOKEN=$(API_RATE_LIMIT_UI_V2_WITH_TOKEN)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ B Y _ I P
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_IP=$(API_RATE_LIMIT_BY_IP)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ T I M E _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_TIME_INTERVAL=$(API_RATE_LIMIT_TIME_INTERVAL)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ B Y _ I P _ T I M E _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_BY_IP_TIME_INTERVAL=$(API_RATE_LIMIT_BY_IP_TIME_INTERVAL)'
e n d i f
i f d e f A P I _ R A T E _ L I M I T _ U I _ V 2 _ T O K E N _ T T L _ I N _ S E C O N D S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS=$(API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS)'
e n d i f
i f d e f T O K E N _ B A L A N C E _ O N _ D E M A N D _ F E T C H E R _ T H R E S H O L D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD=$(TOKEN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD)'
e n d i f
i f d e f C O I N _ B A L A N C E _ O N _ D E M A N D _ F E T C H E R _ T H R E S H O L D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD=$(COIN_BALANCE_ON_DEMAND_FETCHER_THRESHOLD)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ D E B U G _ T R A C E _ T R A N S A C T I O N _ T I M E O U T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT=$(ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT)'
e n d i f
i f d e f E T H E R E U M _ J S O N R P C _ H T T P _ T I M E O U T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_TIMEOUT=$(ETHEREUM_JSONRPC_HTTP_TIMEOUT)'
e n d i f
i f d e f F E T C H _ R E W A R D S _ W A Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FETCH_REWARDS_WAY=$(FETCH_REWARDS_WAY)'
e n d i f
i f d e f F O O T E R _ L O G O
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_LOGO=$(FOOTER_LOGO)'
e n d i f
i f d e f F O O T E R _ C H A T _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_CHAT_LINK=$(FOOTER_CHAT_LINK)'
e n d i f
i f d e f F O O T E R _ G I T H U B _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_GITHUB_LINK=$(FOOTER_GITHUB_LINK)'
e n d i f
i f d e f F O O T E R _ F O R U M _ L I N K _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_FORUM_LINK_ENABLED=$(FOOTER_FORUM_LINK_ENABLED)'
e n d i f
i f d e f F O O T E R _ F O R U M _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_FORUM_LINK=$(FOOTER_FORUM_LINK)'
e n d i f
i f d e f F O O T E R _ T E L E G R A M _ L I N K _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_TELEGRAM_LINK_ENABLED=$(FOOTER_TELEGRAM_LINK_ENABLED)'
e n d i f
i f d e f F O O T E R _ T E L E G R A M _ L I N K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_TELEGRAM_LINK=$(FOOTER_TELEGRAM_LINK)'
e n d i f
i f d e f F O O T E R _ L I N K _ T O _ O T H E R _ E X P L O R E R S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_LINK_TO_OTHER_EXPLORERS=$(FOOTER_LINK_TO_OTHER_EXPLORERS)'
e n d i f
i f d e f F O O T E R _ O T H E R _ E X P L O R E R S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'FOOTER_OTHER_EXPLORERS=$(FOOTER_OTHER_EXPLORERS)'
e n d i f
i f d e f N E T W O R K _ I C O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_ICON=$(NETWORK_ICON)'
e n d i f
i f d e f L O G O _ T E X T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO_TEXT=$(LOGO_TEXT)'
e n d i f
i f d e f S H O W _ T E S T N E T _ L A B E L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_TESTNET_LABEL=$(SHOW_TESTNET_LABEL)'
e n d i f
i f d e f T E S T N E T _ L A B E L _ T E X T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TESTNET_LABEL_TEXT=$(TESTNET_LABEL_TEXT)'
e n d i f
i f d e f C U S T O M _ C O N T R A C T _ A D D R E S S E S _ D A R K _ F O R E S T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST=$(CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST)'
e n d i f
i f d e f C U S T O M _ C O N T R A C T _ A D D R E S S E S _ D A R K _ F O R E S T _ V _ 0 _ 5
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5=$(CUSTOM_CONTRACT_ADDRESSES_DARK_FOREST_V_0_5)'
e n d i f
i f d e f C U S T O M _ C O N T R A C T _ A D D R E S S E S _ C I R C L E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CUSTOM_CONTRACT_ADDRESSES_CIRCLES=$(CUSTOM_CONTRACT_ADDRESSES_CIRCLES)'
e n d i f
i f d e f H E A L T H Y _ B L O C K S _ P E R I O D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEALTHY_BLOCKS_PERIOD=$(HEALTHY_BLOCKS_PERIOD)'
e n d i f
i f d e f E X C H A N G E _ R A T E S _ F E T C H _ B T C _ V A L U E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EXCHANGE_RATES_FETCH_BTC_VALUE=$(EXCHANGE_RATES_FETCH_BTC_VALUE)'
e n d i f
i f d e f T X S _ S T A T S _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_STATS_ENABLED=$(TXS_STATS_ENABLED)'
e n d i f
i f d e f I N D E X E R _ M E M O R Y _ L I M I T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_MEMORY_LIMIT=$(INDEXER_MEMORY_LIMIT)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ P E N D I N G _ T R A N S A C T I O N S _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER=$(INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ I N T E R N A L _ T R A N S A C T I O N S _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=$(INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ B L O C K _ R E W A R D _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_BLOCK_REWARD_FETCHER=$(INDEXER_DISABLE_BLOCK_REWARD_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ A D D R E S S _ C O I N _ B A L A N C E _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_ADDRESS_COIN_BALANCE_FETCHER=$(INDEXER_DISABLE_ADDRESS_COIN_BALANCE_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ C A T A L O G E D _ T O K E N _ U P D A T E R _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_CATALOGED_TOKEN_UPDATER_FETCHER=$(INDEXER_DISABLE_CATALOGED_TOKEN_UPDATER_FETCHER)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ E M P T Y _ B L O C K S _ S A N I T I Z E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER=$(INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER)'
e n d i f
i f d e f I N D E X E R _ C A T C H U P _ B L O C K S _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCKS_BATCH_SIZE=$(INDEXER_CATCHUP_BLOCKS_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ C A T C H U P _ B L O C K S _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCKS_CONCURRENCY=$(INDEXER_CATCHUP_BLOCKS_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ C A T C H U P _ B L O C K _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_CATCHUP_BLOCK_INTERVAL=$(INDEXER_CATCHUP_BLOCK_INTERVAL)'
e n d i f
i f d e f I N D E X E R _ I N T E R N A L _ T R A N S A C T I O N S _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE=$(INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ I N T E R N A L _ T R A N S A C T I O N S _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY=$(INDEXER_INTERNAL_TRANSACTIONS_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ B L O C K _ R E W A R D _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_BLOCK_REWARD_BATCH_SIZE=$(INDEXER_BLOCK_REWARD_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ B L O C K _ R E W A R D _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_BLOCK_REWARD_CONCURRENCY=$(INDEXER_BLOCK_REWARD_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ R E T R Y _ R E F E T C H _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL=$(INDEXER_TOKEN_INSTANCE_RETRY_REFETCH_INTERVAL)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ R E T R Y _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_RETRY_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ R E A L T I M E _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_REALTIME_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ S A N I T I Z E _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY=$(INDEXER_TOKEN_INSTANCE_SANITIZE_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ C O I N _ B A L A N C E S _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_BATCH_SIZE=$(INDEXER_RECEIPTS_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ C O I N _ B A L A N C E S _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_CONCURRENCY=$(INDEXER_RECEIPTS_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ R E C E I P T S _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_BATCH_SIZE=$(INDEXER_RECEIPTS_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ R E C E I P T S _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_RECEIPTS_CONCURRENCY=$(INDEXER_RECEIPTS_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ E M P T Y _ B L O C K S _ S A N I T I Z E R _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_EMPTY_BLOCKS_SANITIZER_BATCH_SIZE=$(INDEXER_EMPTY_BLOCKS_SANITIZER_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_CONCURRENCY=$(INDEXER_TOKEN_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ B A L A N C E S _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_BATCH_SIZE=$(INDEXER_TOKEN_BALANCES_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ B A L A N C E S _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_CONCURRENCY=$(INDEXER_TOKEN_BALANCES_CONCURRENCY)'
e n d i f
i f d e f I N D E X E R _ R E A L T I M E _ F E T C H E R _ M A X _ G A P
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_REALTIME_FETCHER_MAX_GAP=$(INDEXER_REALTIME_FETCHER_MAX_GAP)'
e n d i f
i f d e f I N D E X E R _ F E T C H E R _ I N I T _ Q U E R Y _ L I M I T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_FETCHER_INIT_QUERY_LIMIT=$(INDEXER_FETCHER_INIT_QUERY_LIMIT)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ B A L A N C E S _ F E T C H E R _ I N I T _ Q U E R Y _ L I M I T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT=$(INDEXER_TOKEN_BALANCES_FETCHER_INIT_QUERY_LIMIT)'
e n d i f
i f d e f I N D E X E R _ I N T E R N A L _ T R A N S A C T I O N S _ T R A C E R _ T Y P E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE=$(INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE)'
e n d i f
i f d e f I N D E X E R _ D I S A B L E _ W I T H D R A W A L S _ F E T C H E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_DISABLE_WITHDRAWALS_FETCHER=$(INDEXER_DISABLE_WITHDRAWALS_FETCHER)'
e n d i f
i f d e f W I T H D R A W A L S _ F I R S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'WITHDRAWALS_FIRST_BLOCK=$(WITHDRAWALS_FIRST_BLOCK)'
e n d i f
i f d e f T O K E N _ I D _ M I G R A T I O N _ F I R S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_FIRST_BLOCK=$(TOKEN_ID_MIGRATION_FIRST_BLOCK)'
e n d i f
i f d e f T O K E N _ I D _ M I G R A T I O N _ C O N C U R R E N C Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_CONCURRENCY=$(TOKEN_ID_MIGRATION_CONCURRENCY)'
e n d i f
i f d e f T O K E N _ I D _ M I G R A T I O N _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'TOKEN_ID_MIGRATION_BATCH_SIZE=$(TOKEN_ID_MIGRATION_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ E N A B L E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_ENABLE=$(INDEXER_TX_ACTIONS_ENABLE)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ M A X _ T O K E N _ C A C H E _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE=$(INDEXER_TX_ACTIONS_MAX_TOKEN_CACHE_SIZE)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ R E I N D E X _ F I R S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK=$(INDEXER_TX_ACTIONS_REINDEX_FIRST_BLOCK)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ R E I N D E X _ L A S T _ B L O C K
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK=$(INDEXER_TX_ACTIONS_REINDEX_LAST_BLOCK)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ R E I N D E X _ P R O T O C O L S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS=$(INDEXER_TX_ACTIONS_REINDEX_PROTOCOLS)'
e n d i f
i f d e f I N D E X E R _ T X _ A C T I O N S _ A A V E _ V 3 _ P O O L _ C O N T R A C T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT=$(INDEXER_TX_ACTIONS_AAVE_V3_POOL_CONTRACT)'
e n d i f
i f d e f S E C R E T _ K E Y _ B A S E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'SECRET_KEY_BASE=$(SECRET_KEY_BASE)'
e n d i f
i f d e f P O R T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'PORT=$(PORT)'
e n d i f
i f d e f D A T A B A S E _ R E A D _ O N L Y _ A P I _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATABASE_READ_ONLY_API_URL=$(DATABASE_READ_ONLY_API_URL)'
e n d i f
i f d e f P O O L _ S I Z E _ A P I
BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE_API=$(POOL_SIZE_API)'
e n d i f
i f d e f M I C R O S E R V I C E _ S C _ V E R I F I E R _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_ENABLED=$(MICROSERVICE_SC_VERIFIER_ENABLED)'
e n d i f
i f d e f M I C R O S E R V I C E _ S C _ V E R I F I E R _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_URL=$(MICROSERVICE_SC_VERIFIER_URL)'
e n d i f
i f d e f M I C R O S E R V I C E _ S C _ V E R I F I E R _ T Y P E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SC_VERIFIER_TYPE=$(MICROSERVICE_SC_VERIFIER_TYPE)'
e n d i f
i f d e f M I C R O S E R V I C E _ E T H _ B Y T E C O D E _ D B _ I N T E R V A L _ B E T W E E N _ L O O K U P S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS=$(MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS)'
e n d i f
i f d e f M I C R O S E R V I C E _ V I S U A L I Z E _ S O L 2 U M L _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_VISUALIZE_SOL2UML_ENABLED=$(MICROSERVICE_VISUALIZE_SOL2UML_ENABLED)'
e n d i f
i f d e f M I C R O S E R V I C E _ V I S U A L I Z E _ S O L 2 U M L _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_VISUALIZE_SOL2UML_URL=$(MICROSERVICE_VISUALIZE_SOL2UML_URL)'
e n d i f
i f d e f M I C R O S E R V I C E _ S I G _ P R O V I D E R _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SIG_PROVIDER_ENABLED=$(MICROSERVICE_SIG_PROVIDER_ENABLED)'
e n d i f
i f d e f M I C R O S E R V I C E _ S I G _ P R O V I D E R _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MICROSERVICE_SIG_PROVIDER_URL=$(MICROSERVICE_SIG_PROVIDER_URL)'
e n d i f
i f d e f A C C O U N T _ E N A B L E D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_ENABLED=$(ACCOUNT_ENABLED)'
e n d i f
i f d e f A C C O U N T _ R E D I S _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_REDIS_URL=$(ACCOUNT_REDIS_URL)'
e n d i f
i f d e f C O I N _ N A M E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_NAME=$(COIN_NAME)'
e n d i f
i f d e f A C C O U N T _ A U T H 0 _ D O M A I N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_DOMAIN=$(ACCOUNT_AUTH0_DOMAIN)'
e n d i f
i f d e f A C C O U N T _ A U T H 0 _ C L I E N T _ I D
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_ID=$(ACCOUNT_AUTH0_CLIENT_ID)'
e n d i f
i f d e f A C C O U N T _ A U T H 0 _ C L I E N T _ S E C R E T
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_AUTH0_CLIENT_SECRET=$(ACCOUNT_AUTH0_CLIENT_SECRET)'
e n d i f
i f d e f A C C O U N T _ S E N D G R I D _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_API_KEY=$(ACCOUNT_SENDGRID_API_KEY)'
e n d i f
i f d e f A C C O U N T _ S E N D G R I D _ S E N D E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_SENDER=$(ACCOUNT_SENDGRID_SENDER)'
e n d i f
i f d e f A C C O U N T _ S E N D G R I D _ T E M P L A T E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_SENDGRID_TEMPLATE=$(ACCOUNT_SENDGRID_TEMPLATE)'
e n d i f
i f d e f A C C O U N T _ P U B L I C _ T A G S _ A I R T A B L E _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_URL)'
e n d i f
i f d e f A C C O U N T _ P U B L I C _ T A G S _ A I R T A B L E _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY=$(ACCOUNT_PUBLIC_TAGS_AIRTABLE_API_KEY)'
e n d i f
i f d e f A C C O U N T _ D A T A B A S E _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_DATABASE_URL=$(ACCOUNT_DATABASE_URL)'
e n d i f
i f d e f A C C O U N T _ P O O L _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_POOL_SIZE=$(ACCOUNT_POOL_SIZE)'
e n d i f
i f d e f A C C O U N T _ C L O A K _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_CLOAK_KEY=$(ACCOUNT_CLOAK_KEY)'
e n d i f
i f d e f M I X P A N E L _ T O K E N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MIXPANEL_TOKEN=$(MIXPANEL_TOKEN)'
e n d i f
i f d e f M I X P A N E L _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'MIXPANEL_URL=$(MIXPANEL_URL)'
e n d i f
i f d e f A M P L I T U D E _ A P I _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'AMPLITUDE_API_KEY=$(AMPLITUDE_API_KEY)'
e n d i f
i f d e f A M P L I T U D E _ U R L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'AMPLITUDE_URL=$(AMPLITUDE_URL)'
e n d i f
i f d e f D E C O D E _ N O T _ A _ C O N T R A C T _ C A L L S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'DECODE_NOT_A_CONTRACT_CALLS=$(DECODE_NOT_A_CONTRACT_CALLS)'
e n d i f
i f d e f C O N T R A C T _ V E R I F I C A T I O N _ A L L O W E D _ S O L I D I T Y _ E V M _ V E R S I O N S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS=$(CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS)'
e n d i f
i f d e f C O N T R A C T _ V E R I F I C A T I O N _ A L L O W E D _ V Y P E R _ E V M _ V E R S I O N S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS=$(CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS)'
e n d i f
i f d e f C O N T R A C T _ V E R I F I C A T I O N _ M A X _ L I B R A R I E S
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_VERIFICATION_MAX_LIBRARIES=$(CONTRACT_VERIFICATION_MAX_LIBRARIES)'
e n d i f
i f d e f C O N T R A C T _ M A X _ S T R I N G _ L E N G T H _ W I T H O U T _ T R I M M I N G
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING=$(CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING)'
e n d i f
i f d e f C O N T R A C T _ D I S A B L E _ I N T E R A C T I O N
BLOCKSCOUT_CONTAINER_PARAMS += -e 'CONTRACT_DISABLE_INTERACTION=$(CONTRACT_DISABLE_INTERACTION)'
e n d i f
i f d e f E I P _ 1 5 5 9 _ E L A S T I C I T Y _ M U L T I P L I E R
BLOCKSCOUT_CONTAINER_PARAMS += -e 'EIP_1559_ELASTICITY_MULTIPLIER=$(EIP_1559_ELASTICITY_MULTIPLIER)'
e n d i f
i f d e f A P I _ S E N S I T I V E _ E N D P O I N T S _ K E Y
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_SENSITIVE_ENDPOINTS_KEY=$(API_SENSITIVE_ENDPOINTS_KEY)'
e n d i f
i f d e f A C C O U N T _ V E R I F I C A T I O N _ E M A I L _ R E S E N D _ I N T E R V A L
BLOCKSCOUT_CONTAINER_PARAMS += -e 'ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL=$(ACCOUNT_VERIFICATION_EMAIL_RESEND_INTERVAL)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ R E T R Y _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_RETRY_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ R E A L T I M E _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_REALTIME_BATCH_SIZE)'
e n d i f
i f d e f I N D E X E R _ T O K E N _ I N S T A N C E _ S A N I T I Z E _ B A T C H _ S I Z E
BLOCKSCOUT_CONTAINER_PARAMS += -e 'INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE=$(INDEXER_TOKEN_INSTANCE_SANITIZE_BATCH_SIZE)'
e n d i f
HAS_BLOCKSCOUT_IMAGE := $( shell docker images | grep -sw " ${ BS_CONTAINER_IMAGE } " )
build :
@echo " ==> Checking for blockscout image $( BS_CONTAINER_IMAGE) "
i f d e f H A S _ B L O C K S C O U T _ I M A G E
@echo " ==> Image exist. Using $( BS_CONTAINER_IMAGE) "
e l s e
e l s e
@echo "==> No image found, trying to build one..."
@echo "==> Blockscout backend container already stopped before."
@docker build -f ./Dockerfile --build-arg RELEASE_VERSION = $( RELEASE_VERSION) -t $( BS_CONTAINER_IMAGE) ../
e n d i f
e n d i f
i f d e f B S _ S T A T S _ D B _ S T A R T E D
migrate_only :
@echo "==> Stopping Blockscout stats db container."
@echo "==> Running migrations"
@docker stop $( STATS_DB_CONTAINER_NAME) && docker rm -f $( STATS_DB_CONTAINER_NAME)
@docker run --rm \
@echo "==> Blockscout stats db container stopped."
$( 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 :
i f d e f D A T A B A S E _ U R L
@echo "==> DATABASE_URL of external DB provided. There is no need to start a container for DB."
@$( MAKE) -f $( THIS_FILE) migrate_only
e l s e
e l s e
i f d e f P G _ E X I S T
@echo "==> Blockscout stats db container already stopped before."
@echo "==> Checking PostrgeSQL container"
e n d i f
i f d e f P G _ S T A R T E D
i f d e f B S _ S T A T S _ S T A R T E D
@echo "==> PostgreSQL Already started"
@echo "==> Stopping Blockscout stats container."
@$( MAKE) -f $( THIS_FILE) migrate_only
@docker stop $( STATS_CONTAINER_NAME) && docker rm -f $( STATS_CONTAINER_NAME)
@echo "==> Blockscout stats container stopped."
e l s e
e l s e
@echo "==> Starting PostgreSQL container"
@echo "==> Blockscout stats container already stopped before."
@docker start $( PG_CONTAINER_NAME)
@$( MAKE) -f $( THIS_FILE) migrate_only
e n d i f
e n d i f
i f d e f B S _ V I S U A L I Z E R _ S T A R T E D
@echo "==> Stopping Blockscout visualizer container."
@docker stop $( VISUALIZER_CONTAINER_NAME) && docker rm -f $( VISUALIZER_CONTAINER_NAME)
@echo "==> Blockscout visualizer container stopped."
e l s e
e l s e
@echo "==> Creating new PostgreSQL container"
@echo "==> Blockscout visualizer container already stopped before."
@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
e n d i f
e n d i f
i f d e f B S _ S I G _ P R O V I D E R _ S T A R T E D
@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."
e l s e
@echo "==> Blockscout sig-provider container already stopped before."
e n d i f
e n d i f
i f d e f B S _ P R O X Y _ S T A R T E D
start : build postgres
@echo "==> Stopping Nginx proxy container."
@echo "==> Starting blockscout"
@docker stop $( PROXY_CONTAINER_NAME) && docker rm -f $( PROXY_CONTAINER_NAME)
@docker run --rm --name $( BS_CONTAINER_NAME) \
@echo "==> Nginx proxy container stopped."
$( 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 :
i f d e f B S _ S T A R T E D
@echo "==> Stopping BlockScout container."
@docker stop $( BS_CONTAINER_NAME)
@echo "==> BlockScout container stopped."
e l s e
e l s e
@echo "==> BlockScout container already stopped before."
@echo "==> Nginx proxy container already stopped before."
e n d i f
e n d i f
i f d e f P G _ S T A R T E D
i f d e f P G _ S T A R T E D
@echo "==> Stopping Postgres container."
@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
publish-latest : tag -latest ## publish the `latest` tagged container to hub
@echo 'publish latest to $(DOCKER_REPO)'
@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
publish-version : tag -version ## publish the `{version}` tagged container to hub
@echo 'publish $(TAG) to $(DOCKER_REPO)'
@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
publish-stable-version : tag -stable -version ## publish the `{version}` tagged container to hub
@echo 'publish $(STABLE_TAG) to $(DOCKER_REPO)'
@echo 'publish $(STABLE_TAG) to $(DOCKER_REPO)'
docker push $( BS _CONTAINER_IMAGE) :$( STABLE_TAG)
docker push $( BACKEND _CONTAINER_IMAGE) :$( STABLE_TAG)
# Docker tagging
# Docker tagging
tag : tag -latest tag -version ## Generate container tags for the `{version}` ans `latest` tags
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
tag-latest : ## Generate container `latest` tag
@echo 'create 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
tag-version : ## Generate container `{version}` tag
@echo 'create tag $(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
tag-stable-version : ## Generate container `{version}` tag
@echo 'create tag $(STABLE_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 \
.PHONY : build \
migrate \
start \
start \
stop \
stop \
postgres \
run \
run \
docker-login \
docker-login \
release \
release \