-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-bak.yml
298 lines (282 loc) · 12.4 KB
/
docker-compose-bak.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
version: '2'
networks:
fabric-ca:
services:
ca.orderer.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_ca_orderer
image: "hyperledger/fabric-ca:1.2.0"
command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/ca.orderer.example.com.log'
environment:
- FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CSR_CN=ca.orderer.example.com
- FABRIC_CA_SERVER_CSR_HOSTS=ca.orderer.example.com
- FABRIC_CA_SERVER_DEBUG=true
- BOOTSTRAP_USER_PASS=admin:adminpw
- TARGET_CERTFILE=/data/orderer-ca-cert.pem
- FABRIC_ORGS=orderer org1 org2
volumes:
- ./scripts:/scripts
- ./data:/data
networks:
- fabric-ca
ca.org1.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_ca_org1
image: "hyperledger/fabric-ca:1.2.0"
command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/ca.org1.example.com.log'
environment:
- FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CSR_CN=ca.org1.example.com
- FABRIC_CA_SERVER_CSR_HOSTS=ca.org1.example.com
- FABRIC_CA_SERVER_DEBUG=true
- BOOTSTRAP_USER_PASS=admin:adminpw
- TARGET_CERTFILE=/data/org1-ca-cert.pem
- FABRIC_ORGS=orderer org1 org2
volumes:
- ./scripts:/scripts
- ./data:/data
networks:
- fabric-ca
ca.org2.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_ca_org2
image: "hyperledger/fabric-ca:1.2.0"
command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/ca.org2.example.com.log'
environment:
- FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CSR_CN=ca.org2.example.com
- FABRIC_CA_SERVER_CSR_HOSTS=ca.org2.example.com
- FABRIC_CA_SERVER_DEBUG=true
- BOOTSTRAP_USER_PASS=admin:adminpw
- TARGET_CERTFILE=/data/org2-ca-cert.pem
- FABRIC_ORGS=orderer org1 org2
volumes:
- ./scripts:/scripts
- ./data:/data
networks:
- fabric-ca
setup:
container_name: ${COMPOSE_PROJECT_NAME}_setup
image: "hyperledger/fabric-ca-tools:1.2.0"
command: /bin/bash -c '/scripts/setup-fabric.sh 2>&1 | tee /data/logs/setup.log; sleep 99999'
volumes:
- ./scripts:/scripts
- ./data:/data
networks:
- fabric-ca
depends_on:
- ca.orderer.example.com
- ca.org1.example.com
- ca.org2.example.com
orderer.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_orderer
image: "hyperledger/fabric-ca-orderer:1.2.0"
environment:
- FABRIC_CA_CLIENT_HOME=/var/hyperledger/orderer
- FABRIC_CA_CLIENT_TLS_CERTFILES=/data/orderer-ca-cert.pem
- ENROLLMENT_URL=https://orderer.example.com:[email protected]:7054
- ORDERER_HOME=/var/hyperledger/orderer
- ORDERER_HOST=orderer.example.com
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/data/genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/data/orderer-ca-cert.pem]
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_DEBUG_BROADCASTTRACEDIR=data/logs
- ORG=orderer
- ORG_ADMIN_CERT=/data/orgs/orderer/msp/admincerts/[email protected]
command: /bin/bash -c '/scripts/start-orderer.sh 2>&1 | tee /data/logs/orderer.example.com.log'
volumes:
- ./scripts:/scripts
- ./data:/data
networks:
- fabric-ca
depends_on:
- setup
peer0.org1.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_peer0_org1
image: "hyperledger/fabric-ca-peer:1.2.0"
environment:
- FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org1-ca-cert.pem
- ENROLLMENT_URL=https://peer0.org1.example.com:[email protected]:7054
- PEER_NAME=peer0.org1.example.com
- PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- PEER_HOST=peer0.org1.example.com
- PEER_NAME_PASS=peer0.org1.example.com:peer0.org1.example.compw
- CORE_PEER_ID=peer0.org1.example.com
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/data/org1-ca-cert.pem
- CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
- CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/org1-ca-cert.pem
- CORE_PEER_TLS_CLIENTCERT_FILE=/data/orgs/org1/peer0/tls/server.crt
- CORE_PEER_TLS_CLIENTKEY_FILE=/data/orgs/org1/peer0/tls/server.key
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- ORG=org1
- PEER=peer0
- ORG_ADMIN_CERT=/data/orgs/org1/msp/admincerts/[email protected]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer0.org1.example.com.log'
volumes:
- ./scripts:/scripts
- ./data:/data
- /var/run:/host/var/run
networks:
- fabric-ca
depends_on:
- setup
peer1.org1.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_peer1_org1
image: "hyperledger/fabric-ca-peer:1.2.0"
environment:
- FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org1-ca-cert.pem
- ENROLLMENT_URL=https://peer1.org1.example.com:[email protected]:7054
- PEER_NAME=peer1.org1.example.com
- PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- PEER_HOST=peer1.org1.example.com
- PEER_NAME_PASS=peer1.org1.example.com:peer1.org1.example.compw
- CORE_PEER_ID=peer1.org1.example.com
- CORE_PEER_ADDRESS=peer1.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/data/org1-ca-cert.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- ORG=org1
- PEER=peer1
- ORG_ADMIN_CERT=/data/orgs/org1/msp/admincerts/[email protected]
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer1.org1.example.com.log'
volumes:
- ./scripts:/scripts
- ./data:/data
- /var/run:/host/var/run
networks:
- fabric-ca
depends_on:
- setup
peer0.org2.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_peer0_org2
image: "hyperledger/fabric-ca-peer:1.2.0"
environment:
- FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org2-ca-cert.pem
- ENROLLMENT_URL=https://peer0.org2.example.com:[email protected]:7054
- PEER_NAME=peer0.org2.example.com
- PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- PEER_HOST=peer0.org2.example.com
- PEER_NAME_PASS=peer0.org2.example.com:peer0.org2.example.compw
- CORE_PEER_ID=peer0.org2.example.com
- CORE_PEER_ADDRESS=peer0.org2.example.com:7051
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/data/org2-ca-cert.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- ORG=org2
- PEER=peer0
- ORG_ADMIN_CERT=/data/orgs/org2/msp/admincerts/[email protected]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer0.org2.example.com.log'
volumes:
- ./scripts:/scripts
- ./data:/data
- /var/run:/host/var/run
networks:
- fabric-ca
depends_on:
- setup
peer1.org2.example.com:
container_name: ${COMPOSE_PROJECT_NAME}_peer1_org2
image: "hyperledger/fabric-ca-peer:1.2.0"
environment:
- FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org2-ca-cert.pem
- ENROLLMENT_URL=https://peer1.org2.example.com:[email protected]:7054
- PEER_NAME=peer1.org2.example.com
- PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer
- PEER_HOST=peer1.org2.example.com
- PEER_NAME_PASS=peer1.org2.example.com:peer1.org2.example.compw
- CORE_PEER_ID=peer1.org2.example.com
- CORE_PEER_ADDRESS=peer1.org2.example.com:7051
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/data/org2-ca-cert.pem
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051
- CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
- ORG=org2
- PEER=peer1
- ORG_ADMIN_CERT=/data/orgs/org2/msp/admincerts/[email protected]
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer1.org2.example.com.log'
volumes:
- ./scripts:/scripts
- ./data:/data
- /var/run:/host/var/run
networks:
- fabric-ca
depends_on:
- setup
run:
container_name: run
image: hyperledger/fabric-ca-tools
environment:
- GOPATH=/opt/gopath
command: /bin/bash -c 'sleep 3;/scripts/run-fabric.sh 2>&1 | tee /data/logs/run.log; sleep 99999'
volumes:
- ./scripts:/scripts
- ./data:/data
- /home/ubuntu/fabric-samples:/opt/gopath/src/github.com/hyperledger/fabric-samples
- /src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric
networks:
- fabric-ca
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com