From 2a7d2d9142fd5c98fe2d7f565538c1469a7babd1 Mon Sep 17 00:00:00 2001 From: Danny Skubak <8206446+skubakdj@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:50:14 -0400 Subject: [PATCH] Remove Explorer from docker-compose setup --- tools/docker/README.md | 7 +++---- tools/docker/compose | 12 ------------ tools/docker/dev-secrets.toml | 4 ---- tools/docker/develop.Dockerfile | 2 -- .../docker-compose.explorer-source.yaml | 19 ------------------- tools/docker/docker-compose.explorer.yaml | 16 ---------------- tools/docker/docker-compose.yaml | 17 +---------------- 7 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 tools/docker/docker-compose.explorer-source.yaml delete mode 100644 tools/docker/docker-compose.explorer.yaml diff --git a/tools/docker/README.md b/tools/docker/README.md index cd2b39307f8..58c1e196699 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -25,7 +25,6 @@ Acceptance can be accomplished by using the `acceptance` command. ./compose acceptance ``` -- The explorer can be reached at `http://localhost:8080` - The chainlink node can be reached at `http://localhost:6688` Credentials for logging into the operator-ui can be found [here](../../tools/secrets/apicredentials) @@ -35,7 +34,7 @@ Credentials for logging into the operator-ui can be found [here](../../tools/sec ### Doing local development on the core node Doing quick, iterative changes on the core codebase can still be achieved within the compose setup with the `cld` or `cldo` commands. -The `cld` command will bring up the services that a chainlink node needs to connect to (explorer, parity/geth, postgres), and then attach the users terminal to a docker container containing the host's chainlink repository bind-mounted inside the container at `/usr/local/src/chainlink`. What this means is that any changes made within the host's repository will be synchronized to the container, and vice versa for changes made within the container at `/usr/local/src/chainlink`. +The `cld` command will bring up the services that a chainlink node needs to connect to (parity/geth, postgres), and then attach the users terminal to a docker container containing the host's chainlink repository bind-mounted inside the container at `/usr/local/src/chainlink`. What this means is that any changes made within the host's repository will be synchronized to the container, and vice versa for changes made within the container at `/usr/local/src/chainlink`. This enables a user to make quick changes on either the container or the host, run `cldev` within the attached container, check the new behaviour of the re-built node, and repeat this process until the desired results are achieved. @@ -151,7 +150,7 @@ echo "ALLOW_ORIGINS=http://localhost:1337" > chainlink-variables.env The `logs` command will allow you to follow the logs of any running service. For example: ```bash -./compose up node # starts the node service and all it's dependencies, including devnet, explorer, the DB... +./compose up node # starts the node service and all it's dependencies, including devnet, the DB... ./compose logs devnet # shows the blockchain logs # ^C to exit ./compose logs # shows the combined logs of all running services @@ -217,7 +216,7 @@ The docker env contains direnv, so whatever changes you make locally to your (bi docker build ./tools/docker/ -t chainlink-develop:latest -f ./tools/docker/develop.Dockerfile # create the image docker container create -v /home/ryan/chainlink/chainlink:/root/chainlink --name chainlink-dev chainlink-develop:latest -# if you want to access the db, chain, node, or explorer from the host... expose the relevant ports +# if you want to access the db, chain, node, or from the host... expose the relevant ports # This could also be used in case you want to run some services in the container, and others directly # on the host docker container create -v /home/ryan/chainlink/chainlink:/root/chainlink --name chainlink-dev -p 5432:5432 -p 6688:6688 -p 6689:6689 -p 3000:3000 -p 3001:3001 -p 8545:8545 -p 8546:8546 chainlink-develop:latest diff --git a/tools/docker/compose b/tools/docker/compose index b8150e2c894..b16c1e19332 100755 --- a/tools/docker/compose +++ b/tools/docker/compose @@ -4,11 +4,6 @@ set -ex export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 -# Export Explorer docker tag to be used in docker-compose files -if [ -z $EXPLORER_DOCKER_TAG ]; then - export EXPLORER_DOCKER_TAG="develop" -fi - base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml" # Allow for choosing between geth or parity if [ $GETH_MODE ]; then @@ -17,13 +12,6 @@ else base_files="$base_files -f docker-compose.paritynet.yaml" fi -# Build Explorer from source if path is set -if [ $EXPLORER_SOURCE_PATH ]; then - base_files="$base_files -f docker-compose.explorer-source.yaml" -else - base_files="$base_files -f docker-compose.explorer.yaml" -fi - base="docker-compose $base_files" # base config, used standalone for acceptance dev="$base -f docker-compose.dev.yaml" # config for cldev diff --git a/tools/docker/dev-secrets.toml b/tools/docker/dev-secrets.toml index 41554f9c4f9..b27b8a8a8e3 100644 --- a/tools/docker/dev-secrets.toml +++ b/tools/docker/dev-secrets.toml @@ -2,7 +2,3 @@ [Database] AllowSimplePasswords = true - -[Explorer] -AccessKey = 'u4HULe0pj5xPyuvv' -Secret = 'YDxkVRTmcliehGZPw7f0L2Td3sz3LqutAQyy7sLCEIP6xcWzbO8zgfBWi4DXC6U6' diff --git a/tools/docker/develop.Dockerfile b/tools/docker/develop.Dockerfile index 9ebf82df071..46fad445d66 100644 --- a/tools/docker/develop.Dockerfile +++ b/tools/docker/develop.Dockerfile @@ -29,8 +29,6 @@ RUN echo "listen_addresses='*'" >> /etc/postgresql/10/main/postgresql.conf RUN /etc/init.d/postgresql start &&\ createdb chainlink_test &&\ createdb node_dev &&\ - createdb explorer_dev &&\ - createdb explorer_test &&\ createuser --superuser --no-password root &&\ psql -c "ALTER USER postgres PASSWORD 'node';" diff --git a/tools/docker/docker-compose.explorer-source.yaml b/tools/docker/docker-compose.explorer-source.yaml deleted file mode 100644 index 25793e7cfe8..00000000000 --- a/tools/docker/docker-compose.explorer-source.yaml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3.5' - -services: - explorer: - container_name: chainlink-explorer - image: chainlink/explorer - build: - context: $EXPLORER_SOURCE_PATH - dockerfile: explorer/Dockerfile - entrypoint: yarn workspace @chainlink/explorer dev:compose - restart: always - ports: - - 3001 - depends_on: - - explorer-db - environment: - - EXPLORER_COOKIE_SECRET - - EXPLORER_SERVER_PORT - - PGPASSWORD=$EXPLORER_PGPASSWORD diff --git a/tools/docker/docker-compose.explorer.yaml b/tools/docker/docker-compose.explorer.yaml deleted file mode 100644 index 85361e15220..00000000000 --- a/tools/docker/docker-compose.explorer.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: '3.5' - -services: - explorer: - container_name: chainlink-explorer - image: smartcontract/explorer:${EXPLORER_DOCKER_TAG} - entrypoint: yarn workspace @chainlink/explorer dev:compose - restart: always - ports: - - 3001 - depends_on: - - explorer-db - environment: - - EXPLORER_COOKIE_SECRET - - EXPLORER_SERVER_PORT - - PGPASSWORD=$EXPLORER_PGPASSWORD diff --git a/tools/docker/docker-compose.yaml b/tools/docker/docker-compose.yaml index 19f8026b203..4d3ef7def20 100644 --- a/tools/docker/docker-compose.yaml +++ b/tools/docker/docker-compose.yaml @@ -24,8 +24,6 @@ services: - keystore - config - secrets - depends_on: - - explorer node-2: container_name: chainlink-node-2 @@ -48,20 +46,9 @@ services: - config - secrets - explorer-db: - container_name: chainlink-explorer-db - image: postgres:11.6 - volumes: - - explorer-db-data:/var/lib/postgresql/data - ports: - - 5433:5432 - environment: - POSTGRES_DB: $EXPLORER_DB_NAME - POSTGRES_PASSWORD: $EXPLORER_PGPASSWORD - # TODO # - replace clroot with secrets -# - extract explorer and tools into separate docker-compose files +# - extract tools into separate docker-compose files secrets: node_password: @@ -75,5 +62,3 @@ secrets: secrets: file: dev-secrets.toml -volumes: - explorer-db-data: