From 12022236504d57aa66e5e7469d1697aae88f6bc9 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sat, 13 Aug 2022 22:30:12 -0600 Subject: [PATCH] More compose file updates --- compose/docker-compose-contract.yml | 11 +++++ compose/docker-compose-db-sharding.yml | 2 +- compose/docker-compose-db.yml | 17 +++++++ ...ker-compose-eth-statediff-fill-service.yml | 4 +- compose/docker-compose-ipld-eth-server.yml | 49 +++++++++++++++++++ .../vulcanize-go-ethereum-foundry/build.sh | 2 +- .../vulcanize-test-contract/build.sh | 2 +- 7 files changed, 81 insertions(+), 6 deletions(-) diff --git a/compose/docker-compose-contract.yml b/compose/docker-compose-contract.yml index e69de29b..9a65cd01 100644 --- a/compose/docker-compose-contract.yml +++ b/compose/docker-compose-contract.yml @@ -0,0 +1,11 @@ +version: "3.2" +services: + contract: + depends_on: + go-ethereum: + condition: service_healthy + image: vulcanize/test-contract:local + environment: + ETH_ADDR: "http://go-ethereum:8545" + ports: + - "127.0.0.1:3000:3000" diff --git a/compose/docker-compose-db-sharding.yml b/compose/docker-compose-db-sharding.yml index c0a267e1..169584a9 100644 --- a/compose/docker-compose-db-sharding.yml +++ b/compose/docker-compose-db-sharding.yml @@ -6,7 +6,7 @@ services: depends_on: ipld-eth-db: condition: service_healthy - image: vulcanize/ipld-eth-db:v4.1.4-alpha + image: vulcanize/ipld-eth-db:local environment: DATABASE_USER: "vdbm" DATABASE_NAME: "vulcanize_testing" diff --git a/compose/docker-compose-db.yml b/compose/docker-compose-db.yml index e69de29b..582ef1f1 100644 --- a/compose/docker-compose-db.yml +++ b/compose/docker-compose-db.yml @@ -0,0 +1,17 @@ +version: "3.2" +services: + ipld-eth-db: + restart: always + image: vulcanize/ipld-eth-db:local + environment: + POSTGRES_USER: "vdbm" + POSTGRES_DB: "vulcanize_testing" + POSTGRES_PASSWORD: "password" + healthcheck: + test: ["CMD", "nc", "-v", "localhost", "5432"] + interval: 5s + timeout: 3s + retries: 5 + ports: + - "127.0.0.1:8077:5432" + command: ["postgres", "-c", "log_statement=all"] \ No newline at end of file diff --git a/compose/docker-compose-eth-statediff-fill-service.yml b/compose/docker-compose-eth-statediff-fill-service.yml index 1d9f9cd1..d59de1e5 100644 --- a/compose/docker-compose-eth-statediff-fill-service.yml +++ b/compose/docker-compose-eth-statediff-fill-service.yml @@ -5,9 +5,7 @@ services: depends_on: ipld-eth-db: condition: service_healthy - build: - context: ${vulcanize_eth_statediff_fill_service} - dockerfile: ./Dockerfile + image: vulcanize/eth-statediff-fill-service:local environment: ETH_SERVER_HTTPPATH: 0.0.0.0:8085 VDB_COMMAND: "serve" diff --git a/compose/docker-compose-ipld-eth-server.yml b/compose/docker-compose-ipld-eth-server.yml index e69de29b..39b2d23f 100644 --- a/compose/docker-compose-ipld-eth-server.yml +++ b/compose/docker-compose-ipld-eth-server.yml @@ -0,0 +1,49 @@ +ersion: "3.2" +services: + ipld-eth-server: + restart: unless-stopped + depends_on: + ipld-eth-db: + condition: service_healthy + image: vulcanize/ipld-eth-server:v4.0.5-alpha + environment: + IPLD_SERVER_GRAPHQL: "true" + IPLD_POSTGRAPHILEPATH: http://graphql:5000 + ETH_SERVER_HTTPPATH: 0.0.0.0:8081 + ETH_SERVER_GRAPHQL: "true" + ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082 + VDB_COMMAND: "serve" + ETH_CHAIN_CONFIG: "/tmp/chain.json" + DATABASE_NAME: vulcanize_testing + DATABASE_HOSTNAME: ipld-eth-db + DATABASE_PORT: 5432 + DATABASE_USER: "vdbm" + DATABASE_PASSWORD: "password" + ETH_CHAIN_ID: 99 + ETH_FORWARD_ETH_CALLS: $eth_forward_eth_calls + ETH_PROXY_ON_ERROR: $eth_proxy_on_error + ETH_HTTP_PATH: $eth_http_path + volumes: + - type: bind + source: ../../start-up-files/ipld-eth-server/chain.json + target: /tmp/chain.json + ports: + - "127.0.0.1:8081:8081" + - "127.0.0.1:8082:8082" + + graphql: + restart: unless-stopped + depends_on: + ipld-eth-db: + condition: service_healthy + image: vulcanize/postgraphile:v1.0.1 + environment: + PG_HOST: ipld-eth-db + PG_PORT: 5432 + PG_DATABASE: vulcanize_testing + PG_USER: vdbm + PG_PASSWORD: password + SCHEMA: public,eth + ports: + - "127.0.0.1:5000:5000" + \ No newline at end of file diff --git a/container-build/vulcanize-go-ethereum-foundry/build.sh b/container-build/vulcanize-go-ethereum-foundry/build.sh index 43b4bc21..9124a94b 100755 --- a/container-build/vulcanize-go-ethereum-foundry/build.sh +++ b/container-build/vulcanize-go-ethereum-foundry/build.sh @@ -4,4 +4,4 @@ # See: https://stackoverflow.com/a/246128/1701505 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -docker build -t vulcanize/go-ethereum-foundry:local ${SCRIPT_DIR} +docker build -t vulcanize/go-ethereum-foundry:local --build-arg GENESIS_FILE_PATH=genesis-automine.json ${SCRIPT_DIR} diff --git a/container-build/vulcanize-test-contract/build.sh b/container-build/vulcanize-test-contract/build.sh index 78f5f966..d1fde373 100755 --- a/container-build/vulcanize-test-contract/build.sh +++ b/container-build/vulcanize-test-contract/build.sh @@ -1,2 +1,2 @@ # Build vulcanize/test-contract -docker build -t vulcanize/test-contract:local ${VULCANIZE_REPO_BASE_DIR}/ipld-eth-db-validator/test/contract +docker build -t vulcanize/test-contract:local --build-arg ETH_ADDR=http://go-ethereum:8545 ${VULCANIZE_REPO_BASE_DIR}/ipld-eth-db-validator/test/contract