-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
303 lines (285 loc) · 11.3 KB
/
docker-compose.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
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
version: '2'
networks:
example:
services:
tlsca.orderingservice.com:
container_name: tlsca.orderingservice.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b tls-ca-admin:tls-ca-adminpw --port 7052'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CA_NAME=tlsca.orderingservice.com
- FABRIC_CA_SERVER_CSR_CN=tlsca.orderingservice.com
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=127.0.0.1:9444
volumes:
- ${PWD}/orderingservice/server/tls-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 7052:7052
orgca.orderingservice.com:
container_name: orgca.orderingservice.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b org-ca-admin:org-ca-adminpw'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_PORT=7053
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=../tls/cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=../tls/key.pem
- FABRIC_CA_SERVER_CSR_CN=orgca.orderingservice.com
- FABRIC_CA_SERVER_CA_NAME=orgca.orderingservice.com
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ${PWD}/orderingservice/server/org-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 7053:7053
orderer1.orderingservice.com:
container_name: orderer1.orderingservice.com
image: hyperledger/fabric-orderer:2.3
environment:
- ORDERER_HOME=/tmp/hyperledger/orderer1
- ORDERER_HOST=orderer1.orderingservice.com
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LOCALMSPID=orderingservice
- ORDERER_GENERAL_LOCALMSPDIR=/tmp/hyperledger/orderingservice/orderer1/localMsp/
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_CERTIFICATE=/tmp/hyperledger/orderingservice/orderer1/tls/cert.pem
- ORDERER_GENERAL_TLS_PRIVATEKEY=/tmp/hyperledger/orderingservice/orderer1/tls/key.pem
- ORDERER_GENERAL_BOOTSTRAPMETHOD=none
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_DEBUG_BROADCASTTRACEDIR=/tmp/hyperledger/orderingservice/orderer1/data/logs
- ORDERER_FILELEDGER_LOCATION=/tmp/hyperledger/orderingservice/orderer1/ledgers
- ORDERER_CHANNELPARTICIPATION_ENABLED=true
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:7051
- ORDERER_ADMIN_TLS_ENABLED=true
- ORDERER_ADMIN_TLS_PRIVATEKEY=/tmp/hyperledger/orderingservice/orderer1/tls/key.pem
- ORDERER_ADMIN_TLS_CERTIFICATE=/tmp/hyperledger/orderingservice/orderer1/tls/cert.pem
- ORDERER_ADMIN_TLS_CLIENTAUTHREQUIRED=true
- ORDERER_ADMIN_TLS_CLIENTROOTCAS=/tmp/hyperledger/orderingservice/orderer1/tls/tls-ca-cert.pem
- FABRIC_CFG_PATH=/tmp/hyperledger/orderingservice/orderer1/
- FABRIC_LOGGING_SPEC=DEBUG
volumes:
- ${PWD}/orderingservice/orderer1:/tmp/hyperledger/orderingservice/orderer1/
ports:
- 7050:7050
- 7051:7051
networks:
- example
tlsca.Org1.com:
container_name: tlsca.Org1.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b tls-ca-admin:tls-ca-adminpw --port 8052'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CA_NAME=tlsca.Org1.com
- FABRIC_CA_SERVER_CSR_CN=tlsca.Org1.com
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=127.0.0.1:9444
volumes:
- ${PWD}/Org1/server/tls-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 8052:8052
orgca.Org1.com:
container_name: orgca.Org1.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b org-ca-admin:org-ca-adminpw'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_PORT=8053
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=../tls/cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=../tls/key.pem
- FABRIC_CA_SERVER_CSR_CN=orgca.Org1.com
- FABRIC_CA_SERVER_CA_NAME=orgca.Org1.com
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ${PWD}/Org1/server/org-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 8053:8053
peer1.Org1.com:
container_name: peer1.Org1.com
image: hyperledger/fabric-peer:2.3
environment:
- CORE_PEER_ID=peer1.Org1.com
- CORE_PEER_ADDRESS=peer1.Org1.com:8054
- CORE_PEER_LOCALMSPID=Org1
- CORE_PEER_LISTENADDRESS=0.0.0.0:8054
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8055
- CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/Org1/peer1/localMsp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric-23_example
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/tmp/hyperledger/Org1/peer1/tls/Org1-peer1-tls-cert.pem
- CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/Org1/peer1/tls/Org1-peer1-tls-key.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/Org1/peer1/tls/tls-ca-cert.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=false
- CORE_PEER_GOSSIP_ORGLEADER=true
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.Org1.com:8054
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.Org1.com:8054
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer1.Org1.com.couchdb:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=dbadmin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=dbadminpw
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/Org1/peer1
volumes:
- /var/run:/host/var/run
- ${PWD}/Org1/peer1:/tmp/hyperledger/Org1/peer1
ports:
- 8054:8054
- 8055:8055
- 9443:9443
depends_on:
- peer1.Org1.com.couchdb
networks:
- example
peer1.Org1.com.couchdb:
container_name: peer1.Org1.com.couchdb
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=dbadmin
- COUCHDB_PASSWORD=dbadminpw
ports:
- 5984
networks:
- example
volumes:
- ${PWD}/Org1/peer1/couchdb:/opt/couchdb/data
cli.peer1.Org1.com:
container_name: cli.peer1.Org1.com
image: hyperledger/fabric-tools:2.3
tty: true
environment:
- CORE_PEER_LOCALMSPID=Org1
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer1.Org1.com:8054
- FABRIC_CFG_PATH=/tmp/hyperledger
- ORDERER_TLS_CA=/tmp/hyperledger/orderingservice/client/tls-ca-cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/Org1/client/tls-ca-cert.pem
- CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/Org1/client/org-ca/orgadmin/msp/
- CORE_PEER_TLS_ENABLED=true
- ORDERER_ADDRESS=orderer1.orderingservice.com:7050
working_dir: /tmp/hyperledger
networks:
- example
volumes:
- .:/tmp/hyperledger
tlsca.Org2.com:
container_name: tlsca.Org2.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b tls-ca-admin:tls-ca-adminpw --port 9052'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CA_NAME=Org2-ca-tls
- FABRIC_CA_SERVER_CSR_CN=Org2-ca-tls
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
- FABRIC_CA_SERVER_OPERATIONS_LISTENADDRESS=127.0.0.1:9444
volumes:
- ${PWD}/Org2/server/tls-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 9052:9052
orgca.Org2.com:
container_name: orgca.Org2.com
image: hyperledger/fabric-ca:latest
command: sh -c 'fabric-ca-server start -d -b org-ca-admin:org-ca-adminpw'
environment:
- FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
- FABRIC_CA_SERVER_PORT=9053
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=../tls/cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=../tls/key.pem
- FABRIC_CA_SERVER_CSR_CN=Org2-rca
- FABRIC_CA_SERVER_CA_NAME=Org2-rca
- FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ${PWD}/Org2/server/org-ca:/tmp/hyperledger/fabric-ca
networks:
- example
ports:
- 9053:9053
peer1.Org2.com:
container_name: peer1.Org2.com
image: hyperledger/fabric-peer:2.3
environment:
- CORE_PEER_ID=peer1.Org2.com
- CORE_PEER_ADDRESS=peer1.Org2.com:9054
- CORE_PEER_LOCALMSPID=Org2
- CORE_PEER_LISTENADDRESS=0.0.0.0:9054
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9055
- CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/Org2/peer1/localMsp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric-23_example
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/tmp/hyperledger/Org2/peer1/tls/Org2-peer1-tls-cert.pem
- CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/Org2/peer1/tls/Org2-peer1-tls-key.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/Org2/peer1/tls/tls-ca-cert.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=false
- CORE_PEER_GOSSIP_ORGLEADER=true
- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.Org2.com:9054
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.Org2.com:9054
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=peer1.Org2.com.couchdb:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=dbadmin
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=dbadminpw
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/Org2/peer1
volumes:
- /var/run:/host/var/run
- ${PWD}/Org2/peer1:/tmp/hyperledger/Org2/peer1
ports:
- 9054:9054
- 9055:9055
networks:
- example
depends_on:
- peer1.Org2.com.couchdb
peer1.Org2.com.couchdb:
container_name: peer1.Org2.com.couchdb
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=dbadmin
- COUCHDB_PASSWORD=dbadminpw
ports:
- 5984
networks:
- example
volumes:
- ${PWD}/Org2/peer1/couchdb:/opt/couchdb/data
cli.peer1.Org2.com:
container_name: cli.peer1.Org2.com
image: hyperledger/fabric-tools:2.3
tty: true
environment:
- CORE_PEER_LOCALMSPID=Org2
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer1.Org2.com:9054
- FABRIC_CFG_PATH=/tmp/hyperledger
- ORDERER_TLS_CA=/tmp/hyperledger/orderingservice/client/tls-ca-cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/Org2/client/tls-ca-cert.pem
- CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/Org2/client/org-ca/orgadmin/msp/
- CORE_PEER_TLS_ENABLED=true
- ORDERER_ADDRESS=orderer1.orderingservice.com:7050
working_dir: /tmp/hyperledger
networks:
- example
volumes:
- .:/tmp/hyperledger