Migrate to the new frontend using Docker
- Docker v20.10+
- Docker-compose 2.x.x+
- Running Ethereum JSON RPC client
We assume Blockscout is already deployed in your environment.
git pull origin master
Replace the example environment variables in the
environment:list of the
By default, standard test setup ENV variables (ganache) are set in the
environment:list. Replace these with env vars from your existing backend. The only one you NEED to keep is
API_V2_ENABLED='true'. Any values added here will override existing variables when starting the docker container.
Run all containers (up) and run processes in the background (-d).
docker-compose up -d
Check progress and view containers:
Unless you overrode the default configs, you will see the default port for the backend is 4000, and 3000 for the frontend. However, these are not exposed because they are running within the container. This means localhost:3000 will not work.
Since the proxy is in place (listen 80) the whole application should default to port 80 (which is just localhost). So your instance with the new frontend should now be served on localhost. More details about the recommended proxy setup.
It may take several minutes for the frontend to propagate during this process.
There are several required ENVs for the frontend. If required variables are missing or invalid the frontend will show in error message and will not run the app.
To adjust, stop the frontend container, update the env file (or pass variables directly), and restart the container.
Note that in the
SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URLvariable is different depending on your OS. The default is Linux, if you are running macOS or Windows be sure to comment out the appropriate variables.