-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.btc.yaml
53 lines (49 loc) · 1.54 KB
/
docker-compose.btc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
node1:
container_name: node1
image: bitcoin/bitcoin:28.0
ports:
- "18443:18443"
- "29000:29000"
expose:
- "18444"
- "18443"
healthcheck:
test: [ "CMD", "/entrypoint.sh", "bitcoin-cli", "-rpcuser=bitcoin", "-rpcpassword=bitcoin", "-rpcport=18443", "getmininginfo" ]
volumes:
- ./config/btc/bitcoin.conf:/data/bitcoin.conf
- node1-data:/data
command: [ "/entrypoint.sh", "bitcoind", "-conf=/data/bitcoin.conf", "-connect=node2:18444" ]
node2:
container_name: node2
image: bitcoin/bitcoin:28.0
expose:
- "18444"
- "18443"
healthcheck:
test: [ "CMD", "/entrypoint.sh", "bitcoin-cli", "-rpcuser=bitcoin", "-rpcpassword=bitcoin", "-rpcport=18443", "getmininginfo" ]
volumes:
- ./config/btc/bitcoin.conf:/data/bitcoin.conf
- node2-data:/data
command: [ "/entrypoint.sh", "bitcoind", "-conf=/data/bitcoin.conf", "-connect=node1:18444" ]
broadcaster1:
build: ./
command: [ "./broadcaster", "-host=node1", "-blockchain=btc", "-gen-blocks=15s", "-rate=10", "-limit=30s", "-wait=0s" ]
depends_on:
node1:
condition: service_healthy
node2:
condition: service_healthy
broadcaster2:
build: ./
command: [ "./broadcaster", "-host=node2", "-blockchain=btc", "-gen-blocks=15s", "-rate=10", "-limit=30s", "-wait=10s" ]
depends_on:
node1:
condition: service_healthy
node2:
condition: service_healthy
volumes:
node1-data:
external: false
node2-data:
external: false