forked from IBM/todo-list-fabricV1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-networksetup.yaml
195 lines (187 loc) · 7.72 KB
/
docker-compose-networksetup.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
version: '2'
services:
ca0:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk -b admin:adminpw' -d
volumes:
- ./channel/crypto-config/peerOrganizations/peerOrg1/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
ca1:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
ports:
- "8054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg2-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/96bdb57f4efbdcf201a269899eb47e2a73fbb728ae14d47d0d5afb75ddea71de_sk -b admin:adminpw' -d
volumes:
- ./channel/crypto-config/peerOrganizations/peerOrg2/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
orderer0:
container_name: orderer0
image: hyperledger/fabric-orderer
environment:
- GRPC_TRACE=all
- GRPC_VERBOSITY=debug
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/twoorgs.orderer.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer
- ORDERER_GENERAL_TLS_ENABLED=false
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/tls/orderer/key.pem
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/tls/orderer/cert.pem
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/tls/orderer/ca-cert.pem, /etc/hyperledger/tls/peers/peer0/ca-cert.pem, /etc/hyperledger/tls/peers/peer2/ca-cert.pem]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
- 7050:7050
volumes:
- ./channel:/etc/hyperledger/configtx
- ./channel/crypto-config/ordererOrganizations/ordererOrg1/orderers/ordererOrg1orderer1/:/etc/hyperledger/msp/orderer
- ./tls/orderer:/etc/hyperledger/tls/orderer
- ./tls/peers:/etc/hyperledger/tls/peers
peer0:
container_name: peer0
image: hyperledger/fabric-peer
environment:
- CORE_LOGGING_LEVEL=DEBUG
- CORE_NEXT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_GOSSIP_ORGLEADER=true
- CORE_PEER_ADDRESS=peer0:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0:7051
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca-cert.pem
# 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=fixtures_default
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start --peer-defaultchain=false
ports:
- 7051:7051
- 7053:7053
volumes:
- /var/run/:/host/var/run/
- ./channel/crypto-config/peerOrganizations/peerOrg1/peers/peerOrg1Peer1/:/etc/hyperledger/msp/peer
- ./tls/peers/peer0:/etc/hyperledger/tls
depends_on:
- orderer0
peer1:
container_name: peer1
image: hyperledger/fabric-peer
environment:
- CORE_NEXT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer1
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_ADDRESS=peer1:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1:7051
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca-cert.pem
# 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=fixtures_default
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start --peer-defaultchain=false
ports:
- 7056:7051
- 7058:7053
volumes:
- /var/run/:/host/var/run/
- ./channel/crypto-config/peerOrganizations/peerOrg1/peers/peerOrg1Peer2/:/etc/hyperledger/msp/peer
- ./tls/peers/peer1:/etc/hyperledger/tls
depends_on:
- orderer0
- peer0
peer2:
container_name: peer2
image: hyperledger/fabric-peer
environment:
- CORE_NEXT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer2
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_GOSSIP_ORGLEADER=true
- CORE_PEER_ADDRESS=peer2:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2:7051
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca-cert.pem
# 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=fixtures_default
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start --peer-defaultchain=false
ports:
- 8051:7051
- 8053:7053
volumes:
- /var/run/:/host/var/run/
- ./channel/crypto-config/peerOrganizations/peerOrg2/peers/peerOrg2Peer1/:/etc/hyperledger/msp/peer
- ./tls/peers/peer2:/etc/hyperledger/tls
depends_on:
- orderer0
peer3:
container_name: peer3
image: hyperledger/fabric-peer
environment:
- CORE_NEXT=true
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer3
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_ADDRESS=peer3:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer3:7051
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/cert.pem
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca-cert.pem
# 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=fixtures_default
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start --peer-defaultchain=false
ports:
- 8056:7051
- 8058:7053
volumes:
- /var/run/:/host/var/run/
- ./channel/crypto-config/peerOrganizations/peerOrg2/peers/peerOrg2Peer2/:/etc/hyperledger/msp/peer
- ./tls/peers/peer3:/etc/hyperledger/tls
depends_on:
- orderer0
- peer2
couchdb:
container_name: couchdb
image: couchdb
ports:
- 5984:5984
environment:
COUCHDB_USER: admin
COUCHDB_PASSWORD: password
DB_URL: http://localhost:5984/member_db