-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
executable file
·368 lines (360 loc) · 14.2 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#curl -sSL http://bit.ly/2ysbOFE | bash -s 1.3.0 1.3.0 0.4.13
version: '2'
volumes:
blockpath:
networks:
block:
services:
ca.mfg1.block.com:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.mfg1.block.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.mfg1.block.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/f9e85ec5383e71e8651a5699a9f562b6a05410efc17c46c6abd70970db2e788b_sk
ports:
- "5054:7054"
command: sh -c 'fabric-ca-server start -b mfg1admin:adminpw'
volumes:
- ./crypto-config/peerOrganizations/mfg1.block.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.mfg1.block.com
networks:
- block
ca.mfg2.block.com:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.mfg2.block.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.mfg2.block.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/37d950c218d27d8508c3a09921594a56c7fa7f809f18b9757383e28b7d553103_sk
ports:
- "6054:7054"
command: sh -c 'fabric-ca-server start -b mfg2admin:adminpw'
volumes:
- ./crypto-config/peerOrganizations/mfg2.block.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.mfg2.block.com
networks:
- block
ca.shp1.block.com:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.shp1.block.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.shp1.block.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/e56e12ad776bbf4cc8181530e3a5138b07c6f1d7f0e272772e53e31636dc07c2_sk
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start -b shp1admin:adminpw'
volumes:
- ./crypto-config/peerOrganizations/shp1.block.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.shp1.block.com
networks:
- block
ca.shp2.block.com:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.shp2.block.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.shp2.block.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/30d51127518cca614b9e22495c5d9e75b047d7e81fd9612f37d72876875e5747_sk
ports:
- "8054:7054"
command: sh -c 'fabric-ca-server start -b shp2admin:adminpw'
volumes:
- ./crypto-config/peerOrganizations/shp2.block.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.shp2.block.com
networks:
- block
ca.rtl1.block.com:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.rtl1.block.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.rtl1.block.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0f77c954830a553daeb97c89516887783d701803bd4471e461f88849981260dc_sk
ports:
- "9054:7054"
command: sh -c 'fabric-ca-server start -b rtl1admin:adminpw'
volumes:
- ./crypto-config/peerOrganizations/rtl1.block.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca.rtl1.block.com
networks:
- block
orderer.block.com:
container_name: orderer.block.com
image: hyperledger/fabric-orderer:$IMAGE_TAG
environment:
- ORDERER_GENERAL_LOGLEVEL=info
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/commongenesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
- 7050:7050
volumes:
- ./config/:/etc/hyperledger/configtx
- ./crypto-config/ordererOrganizations/block.com/orderers/orderer.block.com/:/etc/hyperledger/msp/orderer
- ./crypto-config/peerOrganizations/mfg1.block.com/peers/peer0.mfg1.block.com/:/etc/hyperledger/msp/peerMfg1
networks:
- block
peer0.mfg1.block.com:
container_name: peer0.mfg1.block.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.mfg1.block.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Mfg1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.mfg1.block.com:7051
# # the following setting starts chaincode containers on the same
# # bridge network as the peers
# # https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_block
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
# provide the credentials for ledger to connect to CouchDB. The username and password must
# match the username and password set for the associated CouchDB.
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
- 5051:7051
- 5053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/mfg1.block.com/peers/peer0.mfg1.block.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/mfg1.block.com/users:/etc/hyperledger/msp/users
- ./config/:/etc/hyperledger/configtx
# - ./chaincode/:/opt/gopath/src/github.com/
depends_on:
- orderer.block.com
- couchdb0
networks:
- block
peer0.mfg2.block.com:
container_name: peer0.mfg2.block.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.mfg2.block.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Mfg2MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.mfg2.block.com:7051
# # the following setting starts chaincode containers on the same
# # bridge network as the peers
# # https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_block
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984
# The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
# provide the credentials for ledger to connect to CouchDB. The username and password must
# match the username and password set for the associated CouchDB.
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
- 6051:7051
- 6053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/mfg2.block.com/peers/peer0.mfg2.block.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/mfg2.block.com/users:/etc/hyperledger/msp/users
- ./config/:/etc/hyperledger/configtx
# - ./chaincode/:/opt/gopath/src/github.com/
depends_on:
- orderer.block.com
- couchdb1
networks:
- block
peer0.shp1.block.com:
container_name: peer0.shp1.block.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.shp1.block.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Shp1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.shp1.block.com:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_block
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
- 7051:7051
- 7053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/shp1.block.com/peers/peer0.shp1.block.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/shp1.block.com/users:/etc/hyperledger/msp/users
- ./config/:/etc/hyperledger/configtx
# - ./chaincode/:/opt/gopath/src/github.com/
depends_on:
- orderer.block.com
- couchdb2
networks:
- block
peer0.shp2.block.com:
container_name: peer0.shp2.block.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.shp2.block.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Shp2MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.shp2.block.com:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_block
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb3:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
- 8051:7051
- 8053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/shp2.block.com/peers/peer0.shp2.block.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/shp2.block.com/users:/etc/hyperledger/msp/users
- ./config/:/etc/hyperledger/configtx
# - ./chaincode/:/opt/gopath/src/github.com/
depends_on:
- orderer.block.com
- couchdb3
networks:
- block
peer0.rtl1.block.com:
container_name: peer0.rtl1.block.com
image: hyperledger/fabric-peer:$IMAGE_TAG
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.rtl1.block.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Rtl1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.rtl1.block.com:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_block
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb4:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
- 9051:7051
- 9053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/rtl1.block.com/peers/peer0.rtl1.block.com/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/rtl1.block.com/users:/etc/hyperledger/msp/users
- ./config/:/etc/hyperledger/configtx
# - ./chaincode/:/opt/gopath/src/github.com/
depends_on:
- orderer.block.com
- couchdb4
networks:
- block
couchdb0:
container_name: couchdb0
image: hyperledger/fabric-couchdb:$THIRDPARTYIMAGE_TAG
# Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
# for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
ports:
- 5984:5984
networks:
- block
couchdb1:
container_name: couchdb1
image: hyperledger/fabric-couchdb:$THIRDPARTYIMAGE_TAG
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
ports:
- 6984:5984
networks:
- block
couchdb2:
container_name: couchdb2
image: hyperledger/fabric-couchdb:$THIRDPARTYIMAGE_TAG
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
ports:
- 7984:5984
networks:
- block
couchdb3:
container_name: couchdb3
image: hyperledger/fabric-couchdb:$THIRDPARTYIMAGE_TAG
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
ports:
- 8984:5984
networks:
- block
couchdb4:
container_name: couchdb4
image: hyperledger/fabric-couchdb:$THIRDPARTYIMAGE_TAG
environment:
- COUCHDB_USER=
- COUCHDB_PASSWORD=
ports:
- 9984:5984
networks:
- block
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.mfg1.block.com:7051
- CORE_PEER_LOCALMSPID=Mfg1MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/mfg1.block.com/users/Admin@mfg1.block.com/msp
- CORE_CHAINCODE_KEEPALIVE=10
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
volumes:
- /var/run/:/host/var/run/
- ./config/:/etc/hyperledger/configtx
- ./chaincode/:/opt/gopath/src/github.com/
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
networks:
- block
depends_on:
- orderer.block.com
- peer0.mfg1.block.com
- couchdb0
- peer0.shp1.block.com
- couchdb1
- peer0.rtl1.block.com
- couchdb2