Merge pull request #6382 from blockscout/andogro-patch-1

Update README.md
pull/6390/head
Victor Baranov 2 years ago committed by GitHub
commit e772ec276f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      docker-compose/README.md

@ -1,6 +1,6 @@
# Docker-compose configuration # Docker-compose configuration
Runs BlockScout locally in Docker container with usage [docker-compose](https://github.com/docker/compose). Runs Blockscout locally in Docker containers with [docker-compose](https://github.com/docker/compose).
## Prerequisites ## Prerequisites
@ -14,13 +14,15 @@ Runs BlockScout locally in Docker container with usage [docker-compose](https://
docker-compose up --build docker-compose up --build
``` ```
This command uses by-default `docker-compose.yml`, which build the explorer into Docker image and runs 3 Docker containers: This command uses by-default `docker-compose.yml`, which builds the explorer into the Docker image and runs 3 Docker containers:
- one for the database. Postgres 13.x, which will be available at port 7432 on localhost - Postgres 14.x database, which will be available at port 7432 on localhost.
- [smart-contract-verifier](https://github.com/blockscout/blockscout-rs/) service, which will be available at port 8043 on localhost - [Smart-contract-verifier](https://github.com/blockscout/blockscout-rs/) service, which will be available at port 8043 on localhost.
- and the BlockScout explorer at http://localhost:4000 - Blockscout explorer at http://localhost:4000.
## Building Docker contrainers from source with native smart contract verification (deprecated) Note for Linux users: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/
## Building Docker containers from source with native smart contract verification (deprecated)
```bash ```bash
docker-compose -f docker-compose-no-rust-verification.yml up --build docker-compose -f docker-compose-no-rust-verification.yml up --build
@ -28,17 +30,17 @@ docker-compose -f docker-compose-no-rust-verification.yml up --build
## Configs for different Ethereum clients ## Configs for different Ethereum clients
Also, the repo contains built-in configs for different clients without need to build the image The repo contains built-in configs for different clients without needing to build the image.
- Erigon: `docker-compose -f docker-compose-no-build-erigon.yml up -d` - Erigon: `docker-compose -f docker-compose-no-build-erigon.yml up -d`
- Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d` - Geth: `docker-compose -f docker-compose-no-build-geth.yml up -d`
- Nethermind, OpenEthereum: `docker-compose -f docker-compose-no-build-nethermind up -d` - Nethermind, OpenEthereum: `docker-compose -f docker-compose-no-build-nethermind up -d`
- Ganache: `docker-compose -f docker-compose-no-build-ganache.yml up -d` - Ganache: `docker-compose -f docker-compose-no-build-ganache.yml up -d`
- HardHat network: `docker-compose -f docker-compose-no-build-hardhat-network.yml up -d` - HardHat network: `docker-compose -f docker-compose-no-build-hardhat-network.yml up -d`
- Running only explorer without DB: `docker-compose -f docker-compose-no-build-no-db-container.yml up -d`. In this case, one container is created - for the explorer itself. And it assumes that the DB credentials are provided through `DATABASE_URL` environment variable. - Running explorer only without DB: `docker-compose -f docker-compose-no-build-no-db-container.yml up -d`. In this case, one container is created - for the explorer itself. It assumes DB credentials are provided through the `DATABASE_URL` environment variable.
All of the configs assume, that the Ethereum JSON RPC is running at http://localhost:8545. All of the configs assume the Ethereum JSON RPC is running at http://localhost:8545.
In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, where replace `config_file.yml` with the file name of the config, which has been launched before. In order to stop launched containers, run `docker-compose -d -f config_file.yml down`, replacing `config_file.yml` with the file name of the config which was previously launched.
You can play with the BlockScout environment variables, which are present at `./envs/common-blockscout.env`. The description of the environment variables are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables). You can adjust BlockScout environment variables from `./envs/common-blockscout.env`. Descriptions of the ENVs are available in [the docs](https://docs.blockscout.com/for-developers/information-and-settings/env-variables).

Loading…
Cancel
Save