diff --git a/docker/README.md b/docker/README.md index af95f4bbd52..1bdc39ef613 100644 --- a/docker/README.md +++ b/docker/README.md @@ -35,7 +35,8 @@ docker run -it \ The Docker Compose setup requires an Ethereum network name and node to connect to. By default, it will use `mainnet:http://host.docker.internal:8545` in order to connect to an Ethereum node running on your host machine. -You can replace this with anything else in `docker-compose.yaml`. +You can replace this with anything else in `docker-compose.yaml` or set the +environment variables `NETWORK_NAME` and `ETHEREUM_RPC_URL`. After you have set up an Ethereum node—e.g. Ganache or Parity—simply clone this repository and run diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c78c2eb2194..1ec9bfd0adc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,8 +6,6 @@ services: - '8000:8000' - '8001:8001' - '8020:8020' - - '8030:8030' - - '8040:8040' depends_on: - ipfs - postgres @@ -15,11 +13,11 @@ services: - host.docker.internal:host-gateway environment: postgres_host: postgres - postgres_user: graph-node - postgres_pass: let-me-in + postgres_user: ${POSTGRES_USER:-graph-node} + postgres_pass: ${POSTGRESS_PASSWORD:-let-me-in} postgres_db: graph-node ipfs: 'ipfs:5001' - ethereum: 'mainnet:http://host.docker.internal:8545' + ethereum: ${NETWORK_NAME:-mainnet}:${ETHEREUM_RPC_URL:-http://host.docker.internal:8545} GRAPH_LOG: info ipfs: image: ipfs/kubo:v0.17.0 @@ -29,8 +27,6 @@ services: - ./data/ipfs:/data/ipfs:Z postgres: image: postgres - ports: - - '5432:5432' command: [ "postgres", @@ -38,8 +34,8 @@ services: "-cmax_connections=200" ] environment: - POSTGRES_USER: graph-node - POSTGRES_PASSWORD: let-me-in + POSTGRES_USER: ${POSTGRES_USER:-graph-node} + POSTGRES_PASSWORD: ${POSTGRESS_PASSWORD:-let-me-in} POSTGRES_DB: graph-node # FIXME: remove this env. var. which we shouldn't need. Introduced by # , maybe as a