-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-tpl.yaml
183 lines (172 loc) · 7.07 KB
/
docker-compose-tpl.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
version: '2'
networks:
lab:
services:
# Orderer
orderer.samples.cn:
extends:
file: base.yaml
service: fabric_orderer
container_name: orderer.samples.cn
environment:
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/orderer/tls/ca.crt, /etc/hyperledger/pa.bank/tls/ca.crt, /etc/hyperledger/zc.owner/tls/ca.crt, /etc/hyperledger/yh.storage/tls/ca.crt, /etc/hyperledger/sp.supervisor/tls/ca.crt]
volumes:
- ./channel-artifacts/genesis.block:/etc/hyperledger/orderer/genesis.block
- ./crypto-config/ordererOrganizations/samples.cn/orderers/orderer.samples.cn/:/etc/hyperledger/orderer/
- ./crypto-config/peerOrganizations/bank.samples.cn/peers/pa.bank.samples.cn/:/etc/hyperledger/pa.bank/
- ./crypto-config/peerOrganizations/owner.samples.cn/peers/zc.owner.samples.cn/:/etc/hyperledger/zc.owner/
- ./crypto-config/peerOrganizations/storage.samples.cn/peers/yh.storage.samples.cn/:/etc/hyperledger/yh.storage/
- ./crypto-config/peerOrganizations/supervisor.samples.cn/peers/sp.supervisor.samples.cn/:/etc/hyperledger/sp.supervisor/
ports:
- "7050:7050"
# CAs
ca.bank.samples.cn:
extends:
file: base.yaml
service: fabric_ca
container_name: ca.bank.samples.cn
environment:
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.bank.samples.cn-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_BANK_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.bank.samples.cn-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_BANK_PRIVATE_KEY
volumes:
- ./crypto-config/peerOrganizations/bank.samples.cn/ca/:/etc/hyperledger/fabric-ca-server-config
ports:
- "7054:7054"
ca.owner.samples.cn:
extends:
file: base.yaml
service: fabric_ca
container_name: ca.owner.samples.cn
environment:
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.owner.samples.cn-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_OWNER_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.owner.samples.cn-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_OWNER_PRIVATE_KEY
volumes:
- ./crypto-config/peerOrganizations/owner.samples.cn/ca/:/etc/hyperledger/fabric-ca-server-config
ports:
- "8054:7054"
ca.storage.samples.cn:
extends:
file: base.yaml
service: fabric_ca
container_name: ca.storage.samples.cn
environment:
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.storage.samples.cn-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_STORAGE_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.storage.samples.cn-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_STORAGE_PRIVATE_KEY
volumes:
- ./crypto-config/peerOrganizations/storage.samples.cn/ca/:/etc/hyperledger/fabric-ca-server-config
ports:
- "9054:7054"
ca.supervisor.samples.cn:
extends:
file: base.yaml
service: fabric_ca
container_name: ca.supervisor.samples.cn
environment:
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.supervisor.samples.cn-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_SUPERVISOR_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.supervisor.samples.cn-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_SUPERVISOR_PRIVATE_KEY
volumes:
- ./crypto-config/peerOrganizations/supervisor.samples.cn/ca/:/etc/hyperledger/fabric-ca-server-config
ports:
- "10054:7054"
# Peers
pa.bank.samples.cn:
extends:
file: base.yaml
service: fabric_peer
container_name: pa.bank.samples.cn
environment:
- CORE_PEER_ID=pa.bank.samples.cn
- CORE_PEER_ADDRESS=pa.bank.samples.cn:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=pa.bank.samples.cn:7051
# - CORE_PEER_CHAINCODELISTENADDRESS=pa.bank.samples.cn:7052
- CORE_PEER_LOCALMSPID=BankMSP
volumes:
- ./crypto-config/peerOrganizations/bank.samples.cn/peers/pa.bank.samples.cn/:/etc/hyperledger/peer/
ports:
- "7051:7051"
- "7053:7053"
depends_on:
- orderer.samples.cn
zc.owner.samples.cn:
extends:
file: base.yaml
service: fabric_peer
container_name: zc.owner.samples.cn
environment:
- CORE_PEER_ID=zc.owner.samples.cn
- CORE_PEER_ADDRESS=zc.owner.samples.cn:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=zc.owner.samples.cn:7051
# - CORE_PEER_CHAINCODELISTENADDRESS=zc.owner.samples.cn:7052
- CORE_PEER_LOCALMSPID=OwnerMSP
volumes:
- ./crypto-config/peerOrganizations/owner.samples.cn/peers/zc.owner.samples.cn/:/etc/hyperledger/peer/
ports:
- "8051:7051"
- "8053:7053"
depends_on:
- orderer.samples.cn
yh.storage.samples.cn:
extends:
file: base.yaml
service: fabric_peer
container_name: yh.storage.samples.cn
environment:
- CORE_PEER_ID=yh.storage.samples.cn
- CORE_PEER_ADDRESS=yh.storage.samples.cn:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=yh.storage.samples.cn:7051
# - CORE_PEER_CHAINCODELISTENADDRESS=yh.storage.samples.cn:7052
- CORE_PEER_LOCALMSPID=StorageMSP
volumes:
- ./crypto-config/peerOrganizations/storage.samples.cn/peers/yh.storage.samples.cn/:/etc/hyperledger/peer/
ports:
- "9051:7051"
- "9053:7053"
depends_on:
- orderer.samples.cn
sp.supervisor.samples.cn:
extends:
file: base.yaml
service: fabric_peer
container_name: sp.supervisor.samples.cn
environment:
- CORE_PEER_ID=sp.supervisor.samples.cn
- CORE_PEER_ADDRESS=sp.supervisor.samples.cn:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=sp.supervisor.samples.cn:7051
# - CORE_PEER_CHAINCODELISTENADDRESS=sp.supervisor.samples.cn:7052
- CORE_PEER_LOCALMSPID=SupervisorMSP
volumes:
- ./crypto-config/peerOrganizations/supervisor.samples.cn/peers/sp.supervisor.samples.cn/:/etc/hyperledger/peer/
ports:
- "10051:7051"
- "10053:7053"
depends_on:
- orderer.samples.cn
cli.samples.cn:
container_name: cli.samples.cn
image: hyperledger/fabric-tools
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/cli
command: /bin/bash
volumes:
- /var/run/:/host/var/run/
- ./chaincode/:/etc/hyperledger/cli/chaincode/
- ./crypto-config:/etc/hyperledger/cli/crypto-config/
- ./channel-artifacts/:/etc/hyperledger/cli/channel-artifacts/
depends_on:
- pa.bank.samples.cn
- zc.owner.samples.cn
- yh.storage.samples.cn
- sp.supervisor.samples.cn
networks:
- lab