Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Explorer from docker-compose setup #10729

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions tools/docker/compose
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 0 additions & 4 deletions tools/docker/dev-secrets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@

[Database]
AllowSimplePasswords = true

[Explorer]
AccessKey = 'u4HULe0pj5xPyuvv'
Secret = 'YDxkVRTmcliehGZPw7f0L2Td3sz3LqutAQyy7sLCEIP6xcWzbO8zgfBWi4DXC6U6'
2 changes: 0 additions & 2 deletions tools/docker/develop.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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';"

Expand Down
19 changes: 0 additions & 19 deletions tools/docker/docker-compose.explorer-source.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions tools/docker/docker-compose.explorer.yaml

This file was deleted.

17 changes: 1 addition & 16 deletions tools/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ services:
- keystore
- config
- secrets
depends_on:
- explorer

node-2:
container_name: chainlink-node-2
Expand All @@ -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:
Expand All @@ -75,5 +62,3 @@ secrets:
secrets:
file: dev-secrets.toml

volumes:
explorer-db-data:
Loading