Merge pull request #2995 from poanetwork/vb-make-file-fix-typo

Support API_PATH env var in Docker file
pull/2996/head
Victor Baranov 5 years ago committed by GitHub
commit 1549c3c3f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 131
      docker/Makefile

@ -10,6 +10,7 @@
- [#2897](https://github.com/poanetwork/blockscout/pull/2897) - remove duplicate indexes - [#2897](https://github.com/poanetwork/blockscout/pull/2897) - remove duplicate indexes
### Chore ### Chore
- [#2995](https://github.com/poanetwork/blockscout/pull/2995) - Support API_PATH env var in Docker file
## 3.0.0-beta ## 3.0.0-beta

@ -11,190 +11,193 @@ ifeq ($(SYSTEM), Linux)
endif endif
DB_URL = postgresql://postgres:@$(HOST):5432/explorer?ssl=false DB_URL = postgresql://postgres:@$(HOST):5432/explorer?ssl=false
BLOCKSCOUT_CONTAINNER_PARAMS = -e 'MIX_ENV=prod' \ BLOCKSCOUT_CONTAINER_PARAMS = -e 'MIX_ENV=prod' \
-e 'DATABASE_URL=$(DB_URL)' -e 'DATABASE_URL=$(DB_URL)'
ifeq ($(SYSTEM), Linux) ifeq ($(SYSTEM), Linux)
BLOCKSCOUT_CONTAINNER_PARAMS += --network=host BLOCKSCOUT_CONTAINER_PARAMS += --network=host
endif endif
ifdef NETWORK ifdef NETWORK
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK=$(NETWORK)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK=$(NETWORK)'
endif endif
ifdef SUBNETWORK ifdef SUBNETWORK
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SUBNETWORK=$(SUBNETWORK)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUBNETWORK=$(SUBNETWORK)'
endif endif
ifdef NETWORK_ICON ifdef NETWORK_ICON
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK_ICON=$(NETWORK_ICON)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_ICON=$(NETWORK_ICON)'
endif endif
ifdef LOGO ifdef LOGO
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'LOGO=$(LOGO)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO=$(LOGO)'
endif endif
ifdef LOGO_FOOTER ifdef LOGO_FOOTER
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'LOGO_FOOTER=$(LOGO_FOOTER)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'LOGO_FOOTER=$(LOGO_FOOTER)'
endif endif
ifdef ETHEREUM_JSONRPC_VARIANT ifdef ETHEREUM_JSONRPC_VARIANT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_VARIANT=$(ETHEREUM_JSONRPC_VARIANT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_VARIANT=$(ETHEREUM_JSONRPC_VARIANT)'
endif endif
ifdef ETHEREUM_JSONRPC_HTTP_URL ifdef ETHEREUM_JSONRPC_HTTP_URL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_HTTP_URL=$(ETHEREUM_JSONRPC_HTTP_URL)'
endif endif
ifdef ETHEREUM_JSONRPC_TRACE_URL ifdef ETHEREUM_JSONRPC_TRACE_URL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_TRACE_URL=$(ETHEREUM_JSONRPC_TRACE_URL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_TRACE_URL=$(ETHEREUM_JSONRPC_TRACE_URL)'
endif endif
ifdef ETHEREUM_JSONRPC_WS_URL ifdef ETHEREUM_JSONRPC_WS_URL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_WS_URL=$(ETHEREUM_JSONRPC_WS_URL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_WS_URL=$(ETHEREUM_JSONRPC_WS_URL)'
endif endif
ifdef ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT ifdef ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT=$(ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT=$(ETHEREUM_JSONRPC_JSON_RPC_TRANSPORT)'
endif endif
ifdef IPC_PATH ifdef IPC_PATH
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'IPC_PATH=$(IPC_PATH)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'IPC_PATH=$(IPC_PATH)'
endif endif
ifdef NETWORK_PATH ifdef NETWORK_PATH
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'NETWORK_PATH=$(NETWORK_PATH)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'NETWORK_PATH=$(NETWORK_PATH)'
endif endif
ifdef CHECK_ORIGIN ifdef CHECK_ORIGIN
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'CHECK_ORIGIN=$(CHECK_ORIGIN)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHECK_ORIGIN=$(CHECK_ORIGIN)'
endif endif
ifdef COIN ifdef COIN
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'COIN=$(COIN)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN=$(COIN)'
endif endif
ifdef METADATA_CONTRACT ifdef METADATA_CONTRACT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'METADATA_CONTRACT=$(METADATA_CONTRACT)'
endif endif
ifdef VALIDATORS_CONTRACT ifdef VALIDATORS_CONTRACT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'VALIDATORS_CONTRACT=$(VALIDATORS_CONTRACT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'VALIDATORS_CONTRACT=$(VALIDATORS_CONTRACT)'
endif endif
ifdef SUPPLY_MODULE ifdef SUPPLY_MODULE
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SUPPLY_MODULE=$(SUPPLY_MODULE)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPLY_MODULE=$(SUPPLY_MODULE)'
endif endif
ifdef SOURCE_MODULE ifdef SOURCE_MODULE
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SOURCE_MODULE=$(SOURCE_MODULE)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOURCE_MODULE=$(SOURCE_MODULE)'
endif endif
ifdef POOL_SIZE ifdef POOL_SIZE
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'POOL_SIZE=$(POOL_SIZE)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'POOL_SIZE=$(POOL_SIZE)'
endif endif
ifdef ECTO_USE_SSL ifdef ECTO_USE_SSL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ECTO_USE_SSL=$(ECTO_USE_SSL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ECTO_USE_SSL=$(ECTO_USE_SSL)'
endif endif
ifdef DATADOG_HOST ifdef DATADOG_HOST
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DATADOG_HOST=$(DATADOG_HOST)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_HOST=$(DATADOG_HOST)'
endif endif
ifdef DATADOG_PORT ifdef DATADOG_PORT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DATADOG_PORT=$(DATADOG_PORT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DATADOG_PORT=$(DATADOG_PORT)'
endif endif
ifdef SPANDEX_BATCH_SIZE ifdef SPANDEX_BATCH_SIZE
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SPANDEX_BATCH_SIZE=$(SPANDEX_BATCH_SIZE)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_BATCH_SIZE=$(SPANDEX_BATCH_SIZE)'
endif endif
ifdef SPANDEX_SYNC_THRESHOLD ifdef SPANDEX_SYNC_THRESHOLD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SPANDEX_SYNC_THRESHOLD=$(SPANDEX_SYNC_THRESHOLD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SPANDEX_SYNC_THRESHOLD=$(SPANDEX_SYNC_THRESHOLD)'
endif endif
ifdef HEART_BEAT_TIMEOUT ifdef HEART_BEAT_TIMEOUT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'HEART_BEAT_TIMEOUT=$(HEART_BEAT_TIMEOUT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_BEAT_TIMEOUT=$(HEART_BEAT_TIMEOUT)'
endif endif
ifdef HEART_COMMAND ifdef HEART_COMMAND
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'HEART_COMMAND=$(HEART_COMMAND)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'HEART_COMMAND=$(HEART_COMMAND)'
endif endif
ifdef BLOCKSCOUT_VERSION ifdef BLOCKSCOUT_VERSION
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'BLOCKSCOUT_VERSION=$(BLOCKSCOUT_VERSION)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_VERSION=$(BLOCKSCOUT_VERSION)'
endif endif
ifdef RELEASE_LINK ifdef RELEASE_LINK
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'RELEASE_LINK=$(RELEASE_LINK)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'RELEASE_LINK=$(RELEASE_LINK)'
endif endif
ifdef ELIXIR_VERSION ifdef ELIXIR_VERSION
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ELIXIR_VERSION=$(ELIXIR_VERSION)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ELIXIR_VERSION=$(ELIXIR_VERSION)'
endif endif
ifdef BLOCK_TRANSFORMER ifdef BLOCK_TRANSFORMER
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'BLOCK_TRANSFORMER=$(BLOCK_TRANSFORMER)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_TRANSFORMER=$(BLOCK_TRANSFORMER)'
endif endif
ifdef GRAPHIQL_TRANSACTION ifdef GRAPHIQL_TRANSACTION
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'GRAPHIQL_TRANSACTION=$(GRAPHIQL_TRANSACTION)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'GRAPHIQL_TRANSACTION=$(GRAPHIQL_TRANSACTION)'
endif endif
ifdef FIRST_BLOCK ifdef FIRST_BLOCK
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'FIRST_BLOCK=$(FIRST_BLOCK)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'FIRST_BLOCK=$(FIRST_BLOCK)'
endif endif
ifdef LAST_BLOCK ifdef LAST_BLOCK
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'LAST_BLOCK=$(LAST_BLOCK)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'LAST_BLOCK=$(LAST_BLOCK)'
endif endif
ifdef TXS_COUNT_CACHE_PERIOD ifdef TXS_COUNT_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'TXS_COUNT_CACHE_PERIOD=$(TXS_COUNT_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'TXS_COUNT_CACHE_PERIOD=$(TXS_COUNT_CACHE_PERIOD)'
endif endif
ifdef ADDRESS_WITH_BALANCES_UPDATE_INTERVAL ifdef ADDRESS_WITH_BALANCES_UPDATE_INTERVAL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=$(ADDRESS_WITH_BALANCES_UPDATE_INTERVAL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ADDRESS_WITH_BALANCES_UPDATE_INTERVAL=$(ADDRESS_WITH_BALANCES_UPDATE_INTERVAL)'
endif endif
ifdef LINK_TO_OTHER_EXPLORERS ifdef LINK_TO_OTHER_EXPLORERS
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'LINK_TO_OTHER_EXPLORERS=$(LINK_TO_OTHER_EXPLORERS)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'LINK_TO_OTHER_EXPLORERS=$(LINK_TO_OTHER_EXPLORERS)'
endif endif
ifdef COINMARKETCAP_PAGES ifdef COINMARKETCAP_PAGES
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'COINMARKETCAP_PAGES=$(COINMARKETCAP_PAGES)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'COINMARKETCAP_PAGES=$(COINMARKETCAP_PAGES)'
endif endif
ifdef SUPPORTED_CHAINS ifdef SUPPORTED_CHAINS
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SUPPORTED_CHAINS=$(SUPPORTED_CHAINS)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SUPPORTED_CHAINS=$(SUPPORTED_CHAINS)'
endif endif
ifdef BLOCK_COUNT_CACHE_PERIOD ifdef BLOCK_COUNT_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'BLOCK_COUNT_CACHE_PERIOD=$(BLOCK_COUNT_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCK_COUNT_CACHE_PERIOD=$(BLOCK_COUNT_CACHE_PERIOD)'
endif endif
ifdef ADDRESS_SUM_CACHE_PERIOD ifdef ADDRESS_SUM_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ADDRESS_SUM_CACHE_PERIOD=$(ADDRESS_SUM_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ADDRESS_SUM_CACHE_PERIOD=$(ADDRESS_SUM_CACHE_PERIOD)'
endif endif
ifdef ADDRESS_COUNT_CACHE_PERIOD ifdef ADDRESS_COUNT_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ADDRESS_COUNT_CACHE_PERIOD=$(ADDRESS_COUNT_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ADDRESS_COUNT_CACHE_PERIOD=$(ADDRESS_COUNT_CACHE_PERIOD)'
endif endif
ifdef ALLOWED_EVM_VERSIONS ifdef ALLOWED_EVM_VERSIONS
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'ALLOWED_EVM_VERSIONS=$(ALLOWED_EVM_VERSIONS)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'ALLOWED_EVM_VERSIONS=$(ALLOWED_EVM_VERSIONS)'
endif endif
ifdef UNCLES_IN_AVERAGE_BLOCK_TIME ifdef UNCLES_IN_AVERAGE_BLOCK_TIME
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'UNCLES_IN_AVERAGE_BLOCK_TIME=$(UNCLES_IN_AVERAGE_BLOCK_TIME)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'UNCLES_IN_AVERAGE_BLOCK_TIME=$(UNCLES_IN_AVERAGE_BLOCK_TIME)'
endif endif
ifdef AVERAGE_BLOCK_CACHE_PERIOD ifdef AVERAGE_BLOCK_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'AVERAGE_BLOCK_CACHE_PERIOD=$(AVERAGE_BLOCK_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'AVERAGE_BLOCK_CACHE_PERIOD=$(AVERAGE_BLOCK_CACHE_PERIOD)'
endif endif
ifdef MARKET_HISTORY_CACHE_PERIOD ifdef MARKET_HISTORY_CACHE_PERIOD
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'MARKET_HISTORY_CACHE_PERIOD=$(MARKET_HISTORY_CACHE_PERIOD)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'MARKET_HISTORY_CACHE_PERIOD=$(MARKET_HISTORY_CACHE_PERIOD)'
endif endif
ifdef DISABLE_WEBAPP ifdef DISABLE_WEBAPP
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DISABLE_WEBAPP=$(DISABLE_WEBAPP)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_WEBAPP=$(DISABLE_WEBAPP)'
endif endif
ifdef DISABLE_READ_API ifdef DISABLE_READ_API
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DISABLE_READ_API=$(DISABLE_READ_API)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_READ_API=$(DISABLE_READ_API)'
endif endif
ifdef DISABLE_WRITE_API ifdef DISABLE_WRITE_API
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DISABLE_WRITE_API=$(DISABLE_WRITE_API)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_WRITE_API=$(DISABLE_WRITE_API)'
endif endif
ifdef DISABLE_INDEXER ifdef DISABLE_INDEXER
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DISABLE_INDEXER=$(DISABLE_INDEXER)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DISABLE_INDEXER=$(DISABLE_INDEXER)'
endif endif
ifdef WEBAPP_URL ifdef WEBAPP_URL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'WEBAPP_URL=$(WEBAPP_URL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'WEBAPP_URL=$(WEBAPP_URL)'
endif endif
ifdef API_URL ifdef API_URL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'API_URL=$(API_URL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_URL=$(API_URL)'
endif endif
ifdef CHAIN_SPEC_PATH ifdef CHAIN_SPEC_PATH
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'CHAIN_SPEC_PATH=$(CHAIN_SPEC_PATH)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'CHAIN_SPEC_PATH=$(CHAIN_SPEC_PATH)'
endif endif
ifdef COIN_GECKO_ID ifdef COIN_GECKO_ID
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'COIN_GECKO_ID=$(COIN_GECKO_ID)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'COIN_GECKO_ID=$(COIN_GECKO_ID)'
endif endif
ifdef EMISSION_FORMAT ifdef EMISSION_FORMAT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'EMISSION_FORMAT=$(EMISSION_FORMAT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'EMISSION_FORMAT=$(EMISSION_FORMAT)'
endif endif
ifdef REWARDS_CONTRACT_ADDRESS ifdef REWARDS_CONTRACT_ADDRESS
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'REWARDS_CONTRACT_ADDRESS=$(REWARDS_CONTRACT_ADDRESS)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'REWARDS_CONTRACT_ADDRESS=$(REWARDS_CONTRACT_ADDRESS)'
endif endif
ifdef SHOW_ADDRESS_MARKETCAP_PERCENTAGE ifdef SHOW_ADDRESS_MARKETCAP_PERCENTAGE
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SHOW_ADDRESS_MARKETCAP_PERCENTAGE=$(SHOW_ADDRESS_MARKETCAP_PERCENTAGE)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SHOW_ADDRESS_MARKETCAP_PERCENTAGE=$(SHOW_ADDRESS_MARKETCAP_PERCENTAGE)'
endif endif
ifdef BLOCKSCOUT_PROTOCOL ifdef BLOCKSCOUT_PROTOCOL
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'BLOCKSCOUT_PROTOCOL=$(BLOCKSCOUT_PROTOCOL)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_PROTOCOL=$(BLOCKSCOUT_PROTOCOL)'
endif endif
ifdef BLOCKSCOUT_HOST ifdef BLOCKSCOUT_HOST
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'BLOCKSCOUT_HOST=$(BLOCKSCOUT_HOST)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'BLOCKSCOUT_HOST=$(BLOCKSCOUT_HOST)'
endif endif
ifdef DECOMPILED_SMART_CONTRACT_TOKEN ifdef DECOMPILED_SMART_CONTRACT_TOKEN
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'DECOMPILED_SMART_CONTRACT_TOKEN=$(DECOMPILED_SMART_CONTRACT_TOKEN)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'DECOMPILED_SMART_CONTRACT_TOKEN=$(DECOMPILED_SMART_CONTRACT_TOKEN)'
endif endif
ifdef SOCKET_ROOT ifdef SOCKET_ROOT
BLOCKSCOUT_CONTAINNER_PARAMS += -e 'SOCKET_ROOT=$(SOCKET_ROOT)' BLOCKSCOUT_CONTAINER_PARAMS += -e 'SOCKET_ROOT=$(SOCKET_ROOT)'
endif
ifdef API_PATH
BLOCKSCOUT_CONTAINER_PARAMS += -e 'API_PATH=$(API_PATH)'
endif endif
HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep ${DOCKER_IMAGE}) HAS_BLOCKSCOUT_IMAGE := $(shell docker images | grep ${DOCKER_IMAGE})
@ -210,7 +213,7 @@ endif
migrate: build postgres migrate: build postgres
@echo "==> Running migrations" @echo "==> Running migrations"
@docker run --rm \ @docker run --rm \
$(BLOCKSCOUT_CONTAINNER_PARAMS) \ $(BLOCKSCOUT_CONTAINER_PARAMS) \
$(DOCKER_IMAGE) /bin/sh -c "echo $$MIX_ENV && mix do ecto.create, ecto.migrate" $(DOCKER_IMAGE) /bin/sh -c "echo $$MIX_ENV && mix do ecto.create, ecto.migrate"
@ -239,7 +242,7 @@ endif
start: build postgres start: build postgres
@echo "==> Starting blockscout" @echo "==> Starting blockscout"
@docker run --rm --name $(BS_CONTAINER_NAME) \ @docker run --rm --name $(BS_CONTAINER_NAME) \
$(BLOCKSCOUT_CONTAINNER_PARAMS) \ $(BLOCKSCOUT_CONTAINER_PARAMS) \
-p 4000:4000 \ -p 4000:4000 \
$(DOCKER_IMAGE) /bin/sh -c "mix phx.server" $(DOCKER_IMAGE) /bin/sh -c "mix phx.server"

Loading…
Cancel
Save