Delays Geth start until geth-init has finished.

This commit is contained in:
Ben 2024-04-02 09:49:30 +02:00
parent 048c376cdf
commit aa9fd8befc
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
1 changed files with 4 additions and 3 deletions

View File

@ -66,7 +66,7 @@ services:
entrypoint: /bin/sh
command: -c '[ -d /data/geth/chaindata ] && echo "Genesis block already created" || geth init --datadir /data /data/genesis.json'
volumes:
- ./geth-data:/data
- ./geth-data:/data:z
- ./genesis.json:/data/genesis.json
networks:
- codex
@ -97,14 +97,15 @@ services:
- 8547:8547/udp # Discovery
- 8548:8548/tcp # Transport
volumes:
- ./geth-data:/data
- ./geth-data:/data:z
logging:
driver: json-file
options:
max-size: 100m
max-file: 5
depends_on:
- geth-init
geth-init:
condition: service_completed_successfully
networks:
- codex