-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·198 lines (190 loc) · 8.43 KB
/
docker-compose.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
version: '2'
networks:
diploma:
services:
ca:
container_name: ca.goblockchain.com
image: hyperledger/fabric-ca:1.4.1
command: sh -c 'fabric-ca-server start -d -b admin:adminpw --port 7150 --cfg.identities.allowremove'
environment:
- FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca
- FABRIC_CA_SERVER_CLIENT=/etc/hyperledger/fabric-ca-client
- FABRIC_CA_CLIENT_TLS_CERTFILES=/etc/hyperledger/fabric-ca/tls-cert.pem
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_CA_NAME=ca.goblockchain.com
- FABRIC_CA_SERVER_CSR_CN=ca.goblockchain.com
- FABRIC_CA_SERVER_CSR_HOSTS=ca.goblockchain.com
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca/tlsca/ca.goblockchain-key.pem
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca/tlsca/ca.goblockchain-cert.pem
- FABRIC_CA_SERVER_DEBUG=true
volumes:
- ./goblockchain/:/etc/hyperledger/fabric-ca
- ./goblockchain/server:/etc/hyperledger/fabric-ca-server
- ./goblockchain/client:/etc/hyperledger/fabric-ca-client
- ./ca-generation:/etc/hyperledger/scripts
ports:
- 7150:7150
orderer:
container_name: orderer.${ORGANIZATION_NAME2}
image: hyperledger/fabric-orderer
environment:
- FABRIC_LOGGING_SPEC=debug
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- ORDERER_GENERAL_LOCALMSPID=Orderer${ORGANIZATION_NAME}MSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
# Enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/msp/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/msp/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=/etc/hyperledger/msp/orderer/tls/ca.crt
working_dir: /opt/orderer
command: orderer
ports:
- 7050:7050
volumes:
- ./config/:/etc/hyperledger/configtx
- ./crypto-config/ordererOrganizations/orderers/orderer.${COMPANY_DOMAIN}/:/etc/hyperledger/msp/orderer
- ./crypto-config/peerOrganizations/peers/peer.${COMPANY_DOMAIN}/:/etc/hyperledger/msp/peer
networks:
- diploma
orderer2.n2med.com:
container_name: orderer2.n2med.com
image: hyperledger/fabric-orderer
environment:
- FABRIC_CFG_PATH=/etc/hyperledger/ordererConfig3
- FABRIC_LOGGING_SPEC=grpc=debug:info
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LEDGERTYPE=file
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/orderer2/msp
# Enable TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/orderer2/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/orderer2/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/orderer2/tls/ca.crt]
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/etc/hyperledger/orderer2/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/etc/hyperledger/orderer2/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/etc/hyperledger/orderer2/tls/ca.crt]
- ORDERER_OPERATIONS_LISTENADDRESS=127.0.0.1:1444
working_dir: /etc/hyperledger/
command: orderer
ports:
- 7060:7060
volumes:
- ./config/:/etc/hyperledger/configtx
- ./crypto-config/ordererOrganizations/orderers/orderer2.n2med.com/:/etc/hyperledger/orderer2
- ./ordererConfig2:/etc/hyperledger/ordererConfig2
networks:
- n2med
orderer3.n2med.com:
container_name: orderer3.n2med.com
image: hyperledger/fabric-orderer
environment:
- FABRIC_LOGGING_SPEC=grpc=debug:info
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LEDGERTYPE=file
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/orderer3/msp
- FABRIC_CFG_PATH=/etc/hyperledger/ordererConfig3
# Enable TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/orderer3/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/orderer3/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/orderer3/tls/ca.crt]
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/etc/hyperledger/orderer3/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/etc/hyperledger/orderer3/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/etc/hyperledger/orderer3/tls/ca.crt]
- ORDERER_OPERATIONS_LISTENADDRESS=127.0.0.1:1444
working_dir: /etc/hyperledger/
command: orderer
ports:
- 7070:7070
volumes:
- ./config/:/etc/hyperledger/configtx
- ./crypto-config/ordererOrganizations/orderers/orderer3.n2med.com/:/etc/hyperledger/orderer3
- ./ordererConfig3:/etc/hyperledger/ordererConfig3
networks:
- n2med
peer:
container_name: peer${PEER_NUMBER}.${ORGANIZATION_NAME2}
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer${PEER_NUMBER}.${COMPANY_DOMAIN}
- FABRIC_LOGGING_SPEC=debug
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_CHAINCODE_LOGGING_LEVEL=debug
- CORE_PEER_LOCALMSPID=${ORGANIZATION_NAME}MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer${PEER_NUMBER}.${ORGANIZATION_NAME2}:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer${PEER_NUMBER}.${ORGANIZATION_NAME2}:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=diploma_diploma
- CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
- CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=${COUCH_DB_USERNAME}
- CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=${COUCH_DB_PASSWORD}
#Enable TLS
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca.crt
working_dir: /etc/hyperledger/msp/peer
command: peer node start
ports:
- 7051:7051
- 7053:7053
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/peers/peer.${ORGANIZATION_NAME2}/msp:/etc/hyperledger/msp/peer
- ./crypto-config/peerOrganizations/peers/peer.${ORGANIZATION_NAME2}/tls:/etc/hyperledger/tls
- ./crypto-config/peerOrganizations/users:/etc/hyperledger/msp/users
- ./config:/etc/hyperledger/configtx
depends_on:
- orderer
- couchdb
networks:
- diploma
cli:
container_name: cli.${ORGANIZATION_NAME2}
image: hyperledger/fabric-tools
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- FABRIC_LOGGING_SPEC=info
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer${PEER_NUMBER}.${ORGANIZATION_NAME2}:7051
- CORE_PEER_LOCALMSPID=${ORGANIZATION_NAME}MSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/peer/crypto/peerOrganizations/users/[email protected]/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/peer/crypto/peerOrganizations/users/[email protected]/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/peer/crypto/peerOrganizations/users/[email protected]/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/opt/peer/crypto/peerOrganizations/users/[email protected]/msp
- CORE_CHAINCODE_KEEPALIVE=10
working_dir: /opt/peer
command: /bin/bash
volumes:
- /var/run/:/host/var/run/
- ./chaincode/:/opt/gopath/src/github.com/chaincode
- ./crypto-config:/opt/peer/crypto/
- ./config:/etc/hyperledger/configtx
networks:
- diploma
couchdb:
container_name: couchdb.${ORGANIZATION_NAME2}
image: hyperledger/fabric-couchdb
environment:
- COUCHDB_USER=${COUCH_DB_USERNAME}
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
ports:
- 5984:5984
networks:
- diploma