-
Notifications
You must be signed in to change notification settings - Fork 276
/
docker-compose.yml
123 lines (122 loc) · 5.75 KB
/
docker-compose.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Generated by `iroha_swarm`.
# You should not edit this manually.
# Seed: Iroha
services:
irohad0:
image: hyperledger/iroha:dev
environment:
CHAIN: 00000000-0000-0000-0000-000000000000
PUBLIC_KEY: ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D
PRIVATE_KEY: 802620A4DFC16789FBF9A588525E4AC7F791AC51B12AEE8919EACC03EB2FC31D32C692
P2P_PUBLIC_ADDRESS: irohad0:1337
P2P_ADDRESS: 0.0.0.0:1337
API_ADDRESS: 0.0.0.0:8080
GENESIS_PUBLIC_KEY: ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4
TRUSTED_PEERS: '["ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@irohad2:1339","ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D@irohad1:1338","ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE@irohad3:1340"]'
GENESIS_PRIVATE_KEY: 80262082B3BDE54AEBECA4146257DA0DE8D59D8E46D5FE34887DCD8072866792FCB3AD
GENESIS: /tmp/genesis.signed.scale
TOPOLOGY: '["ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10","ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D","ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D","ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE"]'
ports:
- 1337:1337
- 8080:8080
volumes:
- ./genesis.json:/config/genesis.json:ro
- ./client.toml:/config/client.toml:ro
init: true
healthcheck:
test: test $(curl -s http://127.0.0.1:8080/status/blocks) -gt 0
interval: 2s
timeout: 1s
retries: 30
start_period: 4s
command: |-
/bin/bash -c "
EXECUTOR_RELATIVE_PATH=$(jq -r '.executor' /config/genesis.json) && \\
EXECUTOR_ABSOLUTE_PATH=$(realpath \"/config/$$EXECUTOR_RELATIVE_PATH\") && \\
WASM_DIR_RELATIVE_PATH=$(jq -r '.wasm_dir' /config/genesis.json) && \\
WASM_DIR_ABSOLUTE_PATH=$(realpath \"/config/$$WASM_DIR_RELATIVE_PATH\") && \\
jq \\
--arg executor \"$$EXECUTOR_ABSOLUTE_PATH\" \\
--arg wasm_dir \"$$WASM_DIR_ABSOLUTE_PATH\" \\
--argjson topology \"$$TOPOLOGY\" \\
'.executor = $$executor | .wasm_dir = $$wasm_dir | .topology = $$topology' /config/genesis.json \\
>/tmp/genesis.json && \\
kagami genesis sign /tmp/genesis.json \\
--public-key $$GENESIS_PUBLIC_KEY \\
--private-key $$GENESIS_PRIVATE_KEY \\
--out-file $$GENESIS \\
&& \\
exec irohad
"
irohad1:
image: hyperledger/iroha:dev
environment:
CHAIN: 00000000-0000-0000-0000-000000000000
PUBLIC_KEY: ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D
PRIVATE_KEY: 8026203ECA64ADC23DC106C9D703233375EA6AC345AD7299FF3AD45F355DE6CD1B5510
P2P_PUBLIC_ADDRESS: irohad1:1338
P2P_ADDRESS: 0.0.0.0:1338
API_ADDRESS: 0.0.0.0:8081
GENESIS_PUBLIC_KEY: ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4
TRUSTED_PEERS: '["ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@irohad2:1339","ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@irohad0:1337","ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE@irohad3:1340"]'
ports:
- 1338:1338
- 8081:8081
volumes:
- ./genesis.json:/config/genesis.json:ro
- ./client.toml:/config/client.toml:ro
init: true
healthcheck:
test: test $(curl -s http://127.0.0.1:8081/status/blocks) -gt 0
interval: 2s
timeout: 1s
retries: 30
start_period: 4s
irohad2:
image: hyperledger/iroha:dev
environment:
CHAIN: 00000000-0000-0000-0000-000000000000
PUBLIC_KEY: ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10
PRIVATE_KEY: 8026207B1C78F733EDAFD6AF9BAC3A0D6C5A494557DD031609A4FDD9796EEF471D928C
P2P_PUBLIC_ADDRESS: irohad2:1339
P2P_ADDRESS: 0.0.0.0:1339
API_ADDRESS: 0.0.0.0:8082
GENESIS_PUBLIC_KEY: ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4
TRUSTED_PEERS: '["ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D@irohad1:1338","ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@irohad0:1337","ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE@irohad3:1340"]'
ports:
- 1339:1339
- 8082:8082
volumes:
- ./genesis.json:/config/genesis.json:ro
- ./client.toml:/config/client.toml:ro
init: true
healthcheck:
test: test $(curl -s http://127.0.0.1:8082/status/blocks) -gt 0
interval: 2s
timeout: 1s
retries: 30
start_period: 4s
irohad3:
image: hyperledger/iroha:dev
environment:
CHAIN: 00000000-0000-0000-0000-000000000000
PUBLIC_KEY: ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE
PRIVATE_KEY: 8026206C7FF4CA09D395C7B7332C654099406E929C6238942E3CE85155CC1A5E2CF519
P2P_PUBLIC_ADDRESS: irohad3:1340
P2P_ADDRESS: 0.0.0.0:1340
API_ADDRESS: 0.0.0.0:8083
GENESIS_PUBLIC_KEY: ed01204164BF554923ECE1FD412D241036D863A6AE430476C898248B8237D77534CFC4
TRUSTED_PEERS: '["ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@irohad2:1339","ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D@irohad1:1338","ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@irohad0:1337"]'
ports:
- 1340:1340
- 8083:8083
volumes:
- ./genesis.json:/config/genesis.json:ro
- ./client.toml:/config/client.toml:ro
init: true
healthcheck:
test: test $(curl -s http://127.0.0.1:8083/status/blocks) -gt 0
interval: 2s
timeout: 1s
retries: 30
start_period: 4s