Skip to content

Commit fe7dc50

Browse files
committed
chore: Various docker compose setup fixes
- Add missing genesis init for `chain-3-*` - Speed up `db` and `geth` container start by increasing healthcheck frequency - Align geth block time with tendermint
1 parent 2c3bfc6 commit fe7dc50

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

docker/02-init-chain.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for num in 0 1 2 3; do
4646
${BB} sed -i "/ValidatorPublicKey/c\ValidatorPublicKey = \"$(cat data/${validator_cmd}/config/priv_validator_pubkey.hex)\"" /config/keyper-${num}.toml
4747

4848
if [ $num -eq 0 ]; then
49-
for destination in data/chain-seed/config/ data/chain-{1..2}-validator/config/ data/chain-{0..2}-sentry/config/; do
49+
for destination in data/chain-seed/config/ data/chain-{1..3}-validator/config/ data/chain-{0..3}-sentry/config/; do
5050
${BB} cp -v data/chain-0-validator/config/genesis.json "${destination}"
5151
done
5252
fi
@@ -78,7 +78,6 @@ $DC up -d chain-seed chain-{0..3}-{sentry,validator} keyper-{0..3}
7878

7979
echo "We need to wait for the chain to reach height >= 1"
8080
sleep 5
81-
echo "This will take a while..."
8281

8382
$DC run --rm --no-deps --entrypoint /rolling-shutter chain-0-validator bootstrap \
8483
--deployment-dir /deployments/dockerGeth \

docker/config.example/keyper-3.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ ValidatorPublicKey = '8ad31f4e77c5092977d57e578b47dc23a86762933a4c09bcb055456805
3131
EncryptionKey = '13c24d4a50e53bdb4cf8ae328491fd10fbf1bc0118ff6adad1340fa77eaf9c3c'
3232
DKGPhaseLength = 8
3333
DKGStartBlockDelta = 200
34+
35+
[Metrics]
36+
Enabled = true
37+
Host = "[::]"
38+
Port = 9100

docker/docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ services:
2020
- ./data/db:/var/lib/postgresql/data
2121
healthcheck:
2222
test: pg_isready -U postgres
23+
start_period: "30s"
24+
start_interval: "2s"
2325
logging: *logging
2426

2527
geth:
@@ -32,14 +34,17 @@ services:
3234
command: >
3335
--datadir /data
3436
--dev
35-
--dev.period 3
37+
--dev.period 1
38+
--ipcdisable
3639
--http
3740
--http.addr 0.0.0.0
3841
--http.vhosts geth
3942
# No idea why this is suddenly needed - the HEALTHCHECK is defined in the dockerfile but doesn't get picked up anymore...
4043
healthcheck:
4144
test: >
4245
curl -sSf -X POST http://127.0.0.1:8545 -H "Content-Type: application/json" --data-raw '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[], "id": 1}'
46+
start_period: "30s"
47+
start_interval: "2s"
4348
logging: *logging
4449

4550
deploy-contracts:
@@ -391,6 +396,7 @@ services:
391396
CADDY_INGRESS_NETWORKS: snapshutter_default
392397
labels:
393398
caddy.email: [email protected]
399+
logging: *logging
394400

395401
dummyserver:
396402
build:
@@ -399,8 +405,10 @@ services:
399405
restart: always
400406
profiles:
401407
- dev
408+
logging: *logging
402409

403410
dockerize:
404411
image: jwilder/dockerize
405412
profiles:
406413
- script
414+
logging: *logging

0 commit comments

Comments
 (0)