-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
237 lines (223 loc) · 9.48 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
version: '3'
services:
orderer:
image: hyperledger/fabric-orderer
volumes:
- ./docker-bin:${DOCKER_BIN_PATH}
- ./scripts/organization:/scripts
- ./scripts/utils/install_jq.sh:/scripts/install_jq.sh
- ./nodes/orderer:${FABRIC_CFG_PATH}
- ./configs/orderer/orderer.yaml:${FABRIC_CFG_PATH}/orderer.yaml
- ./configs/orderer/configtx.yaml:${FABRIC_CFG_PATH}/configtx.yaml
- ./configs/minatobank/configtx.yaml:${FABRIC_CFG_PATH}/minatobank/configtx.yaml
- ./configs/kitabank/configtx.yaml:${FABRIC_CFG_PATH}/kitabank/configtx.yaml
environment:
- CORE_PEER_LOCALMSPID=${ORDERER_MSPID}
- CORE_PEER_MSPCONFIGPATH=${ORDERER_MSP_CONFIG_PATH}
- FABRIC_LOGGING_SPEC=${FABRIC_LOGGING_SPEC}
- FABRIC_CFG_PATH=${FABRIC_CFG_PATH}
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISPROFILE=OrdererGenesis
- ORDERER_GENERAL_GENESISFILE=genesis.block
- ORDERER_GENERAL_LOCALMSPID=orderer
- ORDERER_GENERAL_LOCALMSPDIR=${ORDERER_MSP_CONFIG_PATH}
ports:
- ${ORDERER_PORT}:${ORDERER_PORT}
networks:
- ${NETWORK}
orderer-ca:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_SERVER_CA_NAME=${ORDERER_CA}
volumes:
- ./nodes/{ORDERER_CA}:/etc/hyperledger/fabric-ca-server
ports:
- ${ORDERER_CA_PORT}:${PLATFORM_CA_PORT}
networks:
- ${NETWORK}
command: sh -c 'fabric-ca-server start -b ${ADMIN_ID}:${ADMIN_PASSWORD} --port ${ORDERER_CA_PORT}'
platform-ca:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_SERVER_CA_NAME=${PLATFORM_CA}
volumes:
- ./nodes/${PLATFORM_CA}:/etc/hyperledger/fabric-ca-server
ports:
- ${PLATFORM_CA_PORT}:${PLATFORM_CA_PORT}
networks:
- ${NETWORK}
command: sh -c 'fabric-ca-server start -b ${ADMIN_ID}:${ADMIN_PASSWORD}'
platform-peer1:
image: hyperledger/fabric-peer
volumes:
- ./docker-bin:${DOCKER_BIN_PATH}
- ./nodes/${PLATFORM_PEER}:${FABRIC_CFG_PATH}
- ./configs/${PLATFORM_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/configtx.yaml
- /var/run/:/host/var/run/
- ./configs/${MINATOBANK_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/${MINATOBANK_MSPID}/configtx.yaml
- ./configs/${KITABANK_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/${KITABANK_MSPID}/configtx.yaml
- ./scripts/identity/add_identity.sh:/scripts/add_identity.sh
- ./scripts/organization:/scripts
- ./scripts/utils/install_jq.sh:/scripts/install_jq.sh
- ./scripts/channel/update_anchor_peer.sh:/scripts/update_anchor_peer.sh
environment:
- FABRIC_LOGGING_SPEC=${FABRIC_LOGGING_SPEC}
- FABRIC_CFG_PATH=${FABRIC_CFG_PATH}
- CORE_PEER_ID=${PLATFORM_PEER}
- CORE_PEER_LOCALMSPID=${PLATFORM_MSPID}
- CORE_PEER_MSPCONFIGPATH=${PLATFORM_MSP_CONFIG_PATH}
- CORE_PEER_ADDRESS=${PLATFORM_PEER}:${PLATFORM_PEER_PORT}
- CORE_PEER_LISTENADDRESS=0.0.0.0:${PLATFORM_PEER_PORT}
- CORE_PEER_CHAINCODEADDRESS=${PLATFORM_PEER}:${PLATFORM_PEER_CHAINCODE_PORT}
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:${PLATFORM_PEER_CHAINCODE_PORT}
- CORE_PEER_GOSSIP_BOOTSTRAP=${PLATFORM_PEER}:${PLATFORM_PEER_PORT}
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=${PLATFORM_PEER}:${PLATFORM_PEER_PORT}
- CORE_CHAINCODE_LOGGING_LEVEL=${FABRIC_LOGGING_SPEC}
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_${NETWORK}
- CORE_LEDGER_STATE_STATEDATABASE=${STATE_DB}
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=${PLATFORM_COUCHDB}:${COUCHDB_PORT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=${COUCHDB_ACCOUNT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${PLATFORM_PEER_PORT}:${PLATFORM_PEER_PORT}
networks:
- ${NETWORK}
depends_on:
- ${PLATFORM_COUCHDB}
platform-couchdb:
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=${COUCHDB_ACCOUNT}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${COUCHDB_PORT}:${COUCHDB_PORT}
networks:
- ${NETWORK}
kitabank-ca:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_SERVER_CA_NAME=${KITABANK_CA}
volumes:
- ./nodes/${KITABANK_CA}:/etc/hyperledger/fabric-ca-server
ports:
- ${KITABANK_CA_PORT}:${KITABANK_CA_PORT}
networks:
- ${NETWORK}
command: sh -c 'fabric-ca-server start -b ${ADMIN_ID}:${ADMIN_PASSWORD} --port ${KITABANK_CA_PORT}'
kitabank-peer1:
image: hyperledger/fabric-peer
volumes:
- /var/run/:/host/var/run/
- ./docker-bin:/docker-bin
- ./nodes/${KITABANK_PEER}:${FABRIC_CFG_PATH}
- ./configs/${KITABANK_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/configtx.yaml
- ./scripts/identity/add_identity.sh:/scripts/add_identity.sh
- ./scripts/channel/join_channel.sh:/scripts/join_channel.sh
environment:
- FABRIC_LOGGING_SPEC=${FABRIC_LOGGING_SPEC}
- FABRIC_CFG_PATH=${FABRIC_CFG_PATH}
- CORE_PEER_ID=${KITABANK_PEER}
- CORE_PEER_LOCALMSPID=${KITABANK_MSPID}
- CORE_PEER_MSPCONFIGPATH=${KITABANK_MSP_CONFIG_PATH}
- CORE_PEER_ADDRESS=${KITABANK_PEER}:${KITABANK_PEER_PORT}
- CORE_PEER_LISTENADDRESS=0.0.0.0:${KITABANK_PEER_PORT}
- CORE_PEER_CHAINCODEADDRESS=${KITABANK_PEER}:${KITABANK_PEER_CHAINCODE_PORT}
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:${KITABANK_PEER_CHAINCODE_PORT}
- CORE_PEER_GOSSIP_BOOTSTRAP=${KITABANK_PEER}:${KITABANK_PEER_PORT}
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=${KITABANK_PEER}:${KITABANK_PEER_PORT}
- CORE_CHAINCODE_LOGGING_LEVEL=${FABRIC_LOGGING_SPEC}
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_${NETWORK}
- CORE_LEDGER_STATE_STATEDATABASE=${STATE_DB}
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=${KITABANK_COUCHDB}:${COUCHDB_PORT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=${COUCHDB_ACCOUNT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${KITABANK_PEER_PORT}:${KITABANK_PEER_PORT}
networks:
- ${NETWORK}
depends_on:
- ${KITABANK_COUCHDB}
kitabank-couchdb:
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=${COUCHDB_ACCOUNT}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${KITABANK_COUCHDB_PORT}:${COUCHDB_PORT}
networks:
- ${NETWORK}
cc-builder:
image: hyperledger/fabric-tools
volumes:
- ./nodes/cc-builder:/etc/hyperledger/fabric
- ./configs/${PLATFORM_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/configtx.yaml
# - ${GOPATH}:/opt/gopath/
- ./chaincodes/:/opt/gopath/src/matilda/chaincodes
- ./configs/collection/:/opt/gopath/src/private_config
environment:
- FABRIC_LOGGING_SPEC=${FABRIC_LOGGING_SPEC}
- FABRIC_CFG_PATH=${FABRIC_CFG_PATH}
- CORE_PEER_LOCALMSPID=${PLATFORM_MSPID}
- CORE_PEER_MSPCONFIGPATH=${PLATFORM_MSP_CONFIG_PATH}
- CORE_PEER_ADDRESS=${PLATFORM_PEER}:${PLATFORM_PEER_PORT}
networks:
- ${NETWORK}
minatobank-ca:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_SERVER_CA_NAME=${MINATOBANK_CA}
volumes:
- ./nodes/${MINATOBANK_CA}:/etc/hyperledger/fabric-ca-server
ports:
- ${MINATOBANK_CA_PORT}:${MINATOBANK_CA_PORT}
networks:
- ${NETWORK}
command: sh -c 'fabric-ca-server start -b ${ADMIN_ID}:${ADMIN_PASSWORD} --port ${MINATOBANK_CA_PORT}'
minatobank-peer1:
image: hyperledger/fabric-peer
volumes:
- /var/run/:/host/var/run/
- ./docker-bin:/docker-bin
- ./nodes/${MINATOBANK_PEER}:${FABRIC_CFG_PATH}
- ./configs/${MINATOBANK_MSPID}/configtx.yaml:${FABRIC_CFG_PATH}/configtx.yaml
- ./scripts/identity/add_identity.sh:/scripts/add_identity.sh
- ./scripts/channel/join_channel.sh:/scripts/join_channel.sh
environment:
- FABRIC_LOGGING_SPEC=${FABRIC_LOGGING_SPEC}
- FABRIC_CFG_PATH=${FABRIC_CFG_PATH}
- CORE_PEER_ID=${MINATOBANK_PEER}
- CORE_PEER_LOCALMSPID=${MINATOBANK_MSPID}
- CORE_PEER_MSPCONFIGPATH=${MINATOBANK_MSP_CONFIG_PATH}
- CORE_PEER_ADDRESS=${MINATOBANK_PEER}:${MINATOBANK_PEER_PORT}
- CORE_PEER_LISTENADDRESS=0.0.0.0:${MINATOBANK_PEER_PORT}
- CORE_PEER_CHAINCODEADDRESS=${MINATOBANK_PEER}:${MINATOBANK_PEER_CHAINCODE_PORT}
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:${MINATOBANK_PEER_CHAINCODE_PORT}
- CORE_PEER_GOSSIP_BOOTSTRAP=${MINATOBANK_PEER}:${MINATOBANK_PEER_PORT}
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=${MINATOBANK_PEER}:${MINATOBANK_PEER_PORT}
- CORE_CHAINCODE_LOGGING_LEVEL=${FABRIC_LOGGING_SPEC}
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_${NETWORK}
- CORE_LEDGER_STATE_STATEDATABASE=${STATE_DB}
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=${MINATOBANK_COUCHDB}:${COUCHDB_PORT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=${COUCHDB_ACCOUNT}
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${MINATOBANK_PEER_PORT}:${MINATOBANK_PEER_PORT}
networks:
- ${NETWORK}
depends_on:
- ${MINATOBANK_COUCHDB}
minatobank-couchdb:
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=${COUCHDB_ACCOUNT}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
ports:
- ${MINATOBANK_COUCHDB_PORT}:${COUCHDB_PORT}
networks:
- ${NETWORK}
networks:
dev: