Skip to content

Commit

Permalink
Merge Ready Docker Compose (#111)
Browse files Browse the repository at this point in the history
* Merge Ready Docker Compose

* Update

* Fix

* Bump version
  • Loading branch information
unxnn authored Sep 5, 2022
1 parent bce79d2 commit 67443e4
Show file tree
Hide file tree
Showing 11 changed files with 187 additions and 207 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,22 @@ cd deploy/mainnet
cp .env.example .env
```

3. Enable `pushover` alerts in `deploy/configs/alertmanager.yml`
3. Create JWT

```shell script
openssl rand -hex 32 > ../configs/jwtsecret
```

4. Enable `pushover` alerts in `deploy/configs/alertmanager.yml`

1. Register an account on [pushover](https://pushover.net/).
2. Create an [Application/API Token](https://pushover.net/apps/build).
3. Add `User Key` and `API Token` to `deploy/configs/alertmanager.yml` file.

4. Run with [docker-compose](https://docs.docker.com/compose/). The docker-compose version must be **v1.27.0+**.
5. Run with [docker-compose](https://docs.docker.com/compose/). The docker-compose version must be **v1.27.0+**.

```shell script
COMPOSE_PROFILES=lighthouse docker-compose up -d
COMPOSE_PROFILES=besu,lighthouse docker-compose up -d
```

## Keeper
Expand All @@ -70,7 +76,7 @@ It helps save the gas cost and stability as there is no need for every oracle to
The ETH1 node is used to submit the transactions on chain. Any of the ETH1 clients can be used:

- [Go-ethereum](https://github.com/ethereum/go-ethereum)
- [OpenEthereum](https://github.com/openethereum/openethereum)
- [Besu](https://github.com/hyperledger/besu)
- [Nethermind](https://github.com/NethermindEth/nethermind)
- [Infura](https://infura.io/docs/eth2) (hosted)
- [Alchemy](https://www.alchemy.com/) (hosted)
Expand All @@ -90,5 +96,5 @@ The ETH1 node is used to submit the transactions on chain. Any of the ETH1 clien
5. Run with [docker-compose](https://docs.docker.com/compose/). The docker-compose version must be **v1.27.0+**.

```shell script
COMPOSE_PROFILES=lighthouse,keeper docker-compose up -d
COMPOSE_PROFILES=besu,lighthouse,keeper docker-compose up -d
```
29 changes: 6 additions & 23 deletions deploy/gnosis/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ networks:
services:
oracle:
container_name: oracle_gnosis
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.7.6
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.8.0
restart: always
entrypoint: ["python"]
command: ["oracle/oracle/main.py"]
Expand All @@ -34,7 +34,7 @@ services:

keeper:
container_name: keeper_gnosis
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.7.6
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.8.0
restart: always
entrypoint: ["python"]
command: ["oracle/keeper/main.py"]
Expand Down Expand Up @@ -117,33 +117,16 @@ services:
networks:
- gnosis

openethereum:
container_name: openethereum_gnosis
image: openethereum/openethereum:v3.3.4
restart: always
command:
- --chain=xdai
- --jsonrpc-interface=all
- --jsonrpc-hosts=all
- --jsonrpc-port=8545
- --min-peers=50
- --max-peers=100
volumes: ["openethereum:/home/openethereum"]
profiles: ["openethereum"]
networks:
gnosis:
aliases:
- eth1-node

nethermind:
container_name: nethermind_gnosis
image: nethermind/nethermind:1.12.6
image: nethermind/nethermind:1.14.0
restart: always
command:
- --config=xdai
- --datadir=/data/nethermind
- --Sync.FastSync=true
- --JsonRpc.Enabled=true
- --JsonRpc.EnabledModules=Eth,Subscribe,Trace,TxPool,Web3,Personal,Proof,Net,Parity,Health
- --JsonRpc.EnabledModules=Net,Eth,Consensus,Subscribe,Web3,Client,Health,Txpool
- --JsonRpc.Host=0.0.0.0
- --JsonRpc.Port=8545
volumes: ["nethermind:/data"]
Expand All @@ -155,7 +138,7 @@ services:

lighthouse:
container_name: lighthouse_gnosis
image: sigp/lighthouse:v2.1.5
image: sigp/lighthouse:v3.1.0
restart: always
command:
- lighthouse
Expand Down
2 changes: 1 addition & 1 deletion deploy/goerli/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ IPFS_FD_MAX=8192
#############
# ETH2 Node #
#############
ETH1_ENDPOINT=http://eth1-node:8545
ETH1_ENDPOINT=http://eth1-node:8551

##############
# Graph Node #
Expand Down
86 changes: 42 additions & 44 deletions deploy/goerli/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ volumes:
driver: local
geth:
driver: local
erigon:
besu:
driver: local
prysm:
driver: local
Expand All @@ -26,7 +26,7 @@ networks:
services:
oracle:
container_name: oracle_goerli
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.7.6
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.8.0
restart: always
entrypoint: ["python"]
command: ["oracle/oracle/main.py"]
Expand All @@ -36,7 +36,7 @@ services:

keeper:
container_name: keeper_goerli
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.7.6
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.8.0
restart: always
entrypoint: ["python"]
command: ["oracle/keeper/main.py"]
Expand Down Expand Up @@ -121,77 +121,74 @@ services:

geth:
container_name: geth_goerli
image: ethereum/client-go:v1.10.15
image: ethereum/client-go:v1.10.23
restart: always
command:
- --goerli
- --syncmode=full
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.vhosts=*
- --http
- --http.addr=0.0.0.0
- --http.port=8545
- --http.vhosts=*
- --http.api=web3,eth,net
- --datadir=/data/ethereum
- --ethash.dagdir=/data/ethereum/.ethash
- --ipcdisable
volumes: ["geth:/data"]
volumes: ["geth:/data","../configs/jwtsecret:/jwtsecret"]
profiles: ["geth"]
networks:
goerli:
aliases:
- eth1-node

erigon:
container_name: erigon_goerli
image: thorax/erigon:v2022.03.02
besu:
container_name: besu_goerli
image: hyperledger/besu:22.7.1
restart: always
command:
- erigon
- --chain=goerli
- --private.api.addr=0.0.0.0:9090
- --maxpeers=100
- --datadir=/home/erigon/.local/share/erigon
- --batchSize=512M
- --prune.r.before=11184524
- --prune=htc
volumes: ["erigon:/home/erigon/.local/share/erigon"]
profiles: ["erigon"]
networks:
- goerli

erigon-rpcdaemon:
container_name: erigon_rpcdaemon_goerli
image: thorax/erigon:v2022.03.02
restart: always
command:
- rpcdaemon
- --private.api.addr=erigon:9090
- --http.addr=0.0.0.0
- --http.vhosts=*
- --http.corsdomain=*
- --http.api=eth,erigon,web3,net,txpool
- --ws
depends_on: ["erigon"]
profiles: ["erigon"]
command: >
--network=goerli
--data-path=/data
--data-storage-format=BONSAI
--sync-mode=X_SNAP
--rpc-http-enabled
--rpc-http-cors-origins=*
--rpc-http-host=0.0.0.0
--rpc-http-max-active-connections=256
--rpc-http-port=8545
--engine-rpc-enabled
--engine-host-allowlist=*
--engine-jwt-secret=/jwtsecret
--engine-rpc-port=8551
--host-allowlist=*
--max-peers=50
volumes: ["besu:/data","../configs/jwtsecret:/jwtsecret"]
user: "0:0"
profiles: ["besu"]
networks:
goerli:
aliases:
- eth1-node

prysm:
container_name: prysm_goerli
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v2.0.6
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v3.0.0
restart: always
command:
- --prater
- --goerli
- --genesis-state=/data/genesis.ssz
- --datadir=/data
- --jwt-secret=/jwtsecret
- --rpc-host=0.0.0.0
- --rpc-port=5052
- --monitoring-host=0.0.0.0
- --http-web3provider=$ETH1_ENDPOINT
- --slots-per-archive-point=64
- --slots-per-archive-point=1024
- --accept-terms-of-use
volumes: ["prysm:/data","../configs/genesis.ssz:/data/gensis.ssz"]
volumes: ["prysm:/data","../configs/genesis.ssz:/data/gensis.ssz","../configs/jwtsecret:/jwtsecret"]
profiles: ["prysm"]
networks:
goerli:
Expand All @@ -200,19 +197,20 @@ services:

lighthouse:
container_name: lighthouse_goerli
image: sigp/lighthouse:v2.1.5
image: sigp/lighthouse:v3.1.0
restart: always
command:
- lighthouse
- --network
- prater
- goerli
- beacon
- --http
- --http-address=0.0.0.0
- --http-port=5052
- --eth1-endpoints
- --execution-endpoint
- $ETH1_ENDPOINT
volumes: ["lighthouse:/root/.lighthouse"]
- --execution-jwt=/jwtsecret
volumes: ["lighthouse:/root/.lighthouse","../configs/jwtsecret:/jwtsecret"]
profiles: ["lighthouse"]
networks:
goerli:
Expand Down
2 changes: 1 addition & 1 deletion deploy/harbour_goerli/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ IPFS_FD_MAX=8192
#############
# ETH2 Node #
#############
ETH1_ENDPOINT=http://eth1-node:8545
ETH1_ENDPOINT=http://eth1-node:8551

##############
# Graph Node #
Expand Down
Loading

0 comments on commit 67443e4

Please sign in to comment.