|
5 | 5 |
|
6 | 6 | version: '2'
|
7 | 7 |
|
| 8 | +networks: |
| 9 | + default: |
| 10 | + |
8 | 11 | services:
|
9 | 12 |
|
10 | 13 | orderer.example.com:
|
11 | 14 | container_name: orderer.example.com
|
12 | 15 | image: hyperledger/fabric-orderer
|
13 | 16 | environment:
|
14 |
| - - CONFIGTX_ORDERER_ORDERERTYPE=solo |
15 |
| - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 |
16 |
| - - ORDERER_GENERAL_LISTENPORT=7050 |
17 | 17 | - ORDERER_GENERAL_LOGLEVEL=debug
|
18 |
| - - ORDERER_GENERAL_LEDGERTYPE=ram |
| 18 | + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default |
| 19 | + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 |
| 20 | + - ORDERER_GENERAL_GENESISPROFILE=SampleSingleMSPSolo |
19 | 21 | - ORDERER_GENERAL_GENESISMETHOD=file
|
20 |
| - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/orderer.block |
21 |
| - - ORDERER_GENERAL_QUEUESIZE=1000 |
22 |
| - - ORDERER_GENERAL_MAXWINDOWSIZE=1000 |
23 |
| - - ORDERER_RAMLEDGER_HISTORY_SIZE=100 |
24 |
| - - ORDERER_GENERAL_BATCHSIZE=10 |
25 |
| - - ORDERER_GENERAL_BATCHTIMEOUT=10s |
26 |
| - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp |
| 22 | + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/configs/orderer.block |
27 | 23 | - ORDERER_GENERAL_LOCALMSPID=example.com
|
| 24 | + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp |
| 25 | + # enabled TLS |
28 | 26 | - ORDERER_GENERAL_TLS_ENABLED=false
|
| 27 | + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/tls/server.key |
| 28 | + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/tls/server.crt |
| 29 | + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt] |
29 | 30 | volumes:
|
30 |
| - - ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/config |
| 31 | + - ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/configs |
31 | 32 | - ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/msp
|
| 33 | + - ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/var/hyperledger/tls |
32 | 34 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
|
33 | 35 | command: orderer
|
34 | 36 | ports:
|
35 | 37 | - '7050'
|
| 38 | + networks: |
| 39 | + default: |
| 40 | + aliases: |
| 41 | + - ${CORE_PEER_NETWORKID} |
36 | 42 |
|
37 | 43 | peer0.org1.example.com:
|
38 | 44 | container_name: peer0.org1.example.com
|
39 | 45 | image: hyperledger/fabric-peer
|
40 | 46 | environment:
|
41 |
| - - CORE_PEER_ID=vp0 |
42 |
| - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 |
| 47 | + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock |
| 48 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 49 | + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default |
| 50 | + - CORE_PEER_ID=peer0.org1.example.com |
| 51 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 52 | + - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 |
| 53 | + # Set this peer as an anchor peer in configtx.yaml |
| 54 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 |
| 55 | + - CORE_PEER_GOSSIP_ORGLEADER=false |
| 56 | + - CORE_PEER_GOSSIP_USELEADERELECTION=true |
| 57 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
43 | 58 | - CORE_PEER_PROFILE_ENABLED=true
|
44 |
| - - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
45 | 59 | - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp
|
46 | 60 | - CORE_PEER_LOCALMSPID=org1.example.com
|
47 |
| - - CORE_NEXT=true |
48 |
| - - CORE_PEER_ENDORSER_ENABLED=true |
49 |
| - - CORE_PEER_GOSSIP_ORGLEADER=false |
50 |
| - - CORE_PEER_GOSSIP_USELEADERELECTION=true |
51 |
| - - CORE_PEER_ADDRESSAUTODETECT=true |
52 | 61 | - CORE_LOGGING_LEVEL=DEBUG
|
53 |
| - - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
54 | 62 | - CORE_PEER_TLS_ENABLED=false
|
55 |
| - - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 63 | + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt |
| 64 | + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key |
| 65 | + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt |
56 | 66 | volumes:
|
| 67 | + - /var/run/:/host/var/run/ |
| 68 | + - /opt/gopath:/opt/gopath |
57 | 69 | - ../configs:/var/hyperledger/configs
|
58 | 70 | - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/var/hyperledger/msp
|
59 |
| - - /var/run/docker.sock:/var/run/docker.sock |
| 71 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/var/hyperledger/tls |
60 | 72 | ports:
|
61 | 73 | - '7051'
|
62 | 74 | - '7053'
|
63 | 75 | depends_on:
|
64 | 76 | - orderer.example.com
|
65 |
| - command: peer node start --peer-defaultchain=false |
| 77 | + links: |
| 78 | + - orderer.example.com |
| 79 | + command: peer node start |
| 80 | + networks: |
| 81 | + default: |
| 82 | + aliases: |
| 83 | + - ${CORE_PEER_NETWORKID} |
66 | 84 |
|
67 | 85 | peer0.org2.example.com:
|
68 | 86 | image: hyperledger/fabric-peer
|
69 | 87 | container_name: peer0.org2.example.com
|
70 | 88 | environment:
|
71 |
| - - CORE_PEER_ID=vp1 |
72 |
| - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 |
73 |
| - - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
74 |
| - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
75 |
| - - CORE_PEER_LOCALMSPID=org2.example.com |
76 |
| - - CORE_NEXT=true |
77 |
| - - CORE_PEER_ENDORSER_ENABLED=true |
| 89 | + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock |
| 90 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 91 | + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default |
| 92 | + - CORE_PEER_ID=peer0.org2.example.com |
| 93 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 94 | + - CORE_PEER_ADDRESS=peer0.org2.example.com:7051 |
| 95 | + # Set this peer as an anchor peer in configtx.yaml |
| 96 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051 |
78 | 97 | - CORE_PEER_GOSSIP_ORGLEADER=false
|
79 | 98 | - CORE_PEER_GOSSIP_USELEADERELECTION=true
|
80 |
| - - CORE_PEER_ADDRESSAUTODETECT=true |
| 99 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 100 | + - CORE_PEER_PROFILE_ENABLED=true |
| 101 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 102 | + - CORE_PEER_LOCALMSPID=org2.example.com |
81 | 103 | - CORE_LOGGING_LEVEL=DEBUG
|
82 |
| - - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
83 | 104 | - CORE_PEER_TLS_ENABLED=false
|
84 |
| - - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 105 | + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt |
| 106 | + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key |
| 107 | + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt |
85 | 108 | volumes:
|
| 109 | + - /var/run/:/host/var/run/ |
| 110 | + - /opt/gopath:/opt/gopath |
86 | 111 | - ../configs:/var/hyperledger/configs
|
87 | 112 | - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/var/hyperledger/msp
|
88 |
| - - /var/run/docker.sock:/var/run/docker.sock |
| 113 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/var/hyperledger/tls |
89 | 114 | ports:
|
90 | 115 | - '7051'
|
91 | 116 | - '7053'
|
92 | 117 | depends_on:
|
93 | 118 | - orderer.example.com
|
94 | 119 | - peer0.org1.example.com
|
95 |
| - command: peer node start --peer-defaultchain=false |
| 120 | + links: |
| 121 | + - orderer.example.com |
| 122 | + command: peer node start |
| 123 | + networks: |
| 124 | + default: |
| 125 | + aliases: |
| 126 | + - ${CORE_PEER_NETWORKID} |
96 | 127 |
|
97 | 128 | peer1.org1.example.com:
|
98 | 129 | image: hyperledger/fabric-peer
|
99 | 130 | container_name: peer1.org1.example.com
|
100 | 131 | environment:
|
101 |
| - - CORE_PEER_ID=vp2 |
102 |
| - - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:7051 |
103 |
| - - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
104 |
| - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
105 |
| - - CORE_PEER_LOCALMSPID=org1.example.com |
106 |
| - - CORE_NEXT=true |
107 |
| - - CORE_PEER_ENDORSER_ENABLED=true |
| 132 | + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock |
| 133 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 134 | + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default |
| 135 | + - CORE_PEER_ID=peer1.org1.example.com |
| 136 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 137 | + - CORE_PEER_ADDRESS=peer1.org1.example.com:7051 |
| 138 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 |
108 | 139 | - CORE_PEER_GOSSIP_ORGLEADER=false
|
109 | 140 | - CORE_PEER_GOSSIP_USELEADERELECTION=true
|
110 |
| - - CORE_PEER_ADDRESSAUTODETECT=true |
| 141 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 142 | + - CORE_PEER_PROFILE_ENABLED=true |
| 143 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 144 | + - CORE_PEER_LOCALMSPID=org1.example.com |
111 | 145 | - CORE_LOGGING_LEVEL=DEBUG
|
112 |
| - - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
113 | 146 | - CORE_PEER_TLS_ENABLED=false
|
114 |
| - - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 147 | + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt |
| 148 | + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key |
| 149 | + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt |
115 | 150 | volumes:
|
| 151 | + - /var/run/:/host/var/run/ |
| 152 | + - /opt/gopath:/opt/gopath |
116 | 153 | - ../configs:/var/hyperledger/configs
|
117 | 154 | - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/var/hyperledger/msp
|
118 |
| - - /var/run/docker.sock:/var/run/docker.sock |
| 155 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/var/hyperledger/tls |
119 | 156 | ports:
|
120 | 157 | - '7051'
|
121 | 158 | - '7053'
|
122 | 159 | depends_on:
|
123 | 160 | - orderer.example.com
|
124 | 161 | - peer0.org1.example.com
|
125 |
| - command: peer node start --peer-defaultchain=false |
| 162 | + links: |
| 163 | + - orderer.example.com |
| 164 | + command: peer node start |
| 165 | + networks: |
| 166 | + default: |
| 167 | + aliases: |
| 168 | + - ${CORE_PEER_NETWORKID} |
126 | 169 |
|
127 | 170 | peer1.org2.example.com:
|
128 | 171 | image: hyperledger/fabric-peer
|
129 | 172 | container_name: peer1.org2.example.com
|
130 | 173 | environment:
|
131 |
| - - CORE_PEER_ID=vp3 |
132 |
| - - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org0.example.com:7051 |
133 |
| - - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
134 |
| - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
135 |
| - - CORE_PEER_LOCALMSPID=org2.example.com |
136 |
| - - CORE_NEXT=true |
137 |
| - - CORE_PEER_ENDORSER_ENABLED=true |
| 174 | + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock |
| 175 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 176 | + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default |
| 177 | + - CORE_PEER_ID=peer1.org2.example.com |
| 178 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 179 | + - CORE_PEER_ADDRESS=peer1.org2.example.com:7051 |
| 180 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 |
138 | 181 | - CORE_PEER_GOSSIP_ORGLEADER=false
|
139 | 182 | - CORE_PEER_GOSSIP_USELEADERELECTION=true
|
140 |
| - - CORE_PEER_ADDRESSAUTODETECT=true |
| 183 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 184 | + - CORE_PEER_PROFILE_ENABLED=true |
| 185 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 186 | + - CORE_PEER_LOCALMSPID=org2.example.com |
141 | 187 | - CORE_LOGGING_LEVEL=DEBUG
|
142 |
| - - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
143 | 188 | - CORE_PEER_TLS_ENABLED=false
|
144 |
| - - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 189 | + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt |
| 190 | + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key |
| 191 | + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt |
145 | 192 | volumes:
|
| 193 | + - /var/run/:/host/var/run/ |
| 194 | + - /opt/gopath:/opt/gopath |
146 | 195 | - ../configs:/var/hyperledger/configs
|
147 | 196 | - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/var/hyperledger/msp
|
148 |
| - - /var/run/docker.sock:/var/run/docker.sock |
| 197 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/var/hyperledger/tls |
149 | 198 | ports:
|
150 | 199 | - '7051'
|
151 | 200 | - '7053'
|
152 | 201 | depends_on:
|
153 | 202 | - orderer.example.com
|
154 |
| - - peer0.org1.example.com |
155 |
| - command: peer node start --peer-defaultchain=false |
| 203 | + - peer0.org2.example.com |
| 204 | + links: |
| 205 | + - orderer.example.com |
| 206 | + command: peer node start |
| 207 | + networks: |
| 208 | + default: |
| 209 | + aliases: |
| 210 | + - ${CORE_PEER_NETWORKID} |
| 211 | + |
| 212 | + cli: |
| 213 | + container_name: cli |
| 214 | + image: hyperledger/fabric-tools |
| 215 | + tty: true |
| 216 | + environment: |
| 217 | + - GOPATH=/opt/gopath |
| 218 | + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock |
| 219 | + - CORE_LOGGING_LEVEL=DEBUG |
| 220 | + - CORE_PEER_TLS_ENABLED=false |
| 221 | + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt |
| 222 | + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key |
| 223 | + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt |
| 224 | + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer |
| 225 | + command: /bin/bash -c 'sleep 6000000000000000000' |
| 226 | + volumes: |
| 227 | + - /var/run/:/host/var/run/ |
| 228 | + - /opt/gopath:/opt/gopath |
| 229 | + - ../configs:/var/hyperledger/configs |
| 230 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/var/hyperledger/tls |
| 231 | + depends_on: |
| 232 | + - orderer.example.com |
| 233 | + - peer0.org1.example.com |
| 234 | + - peer1.org1.example.com |
| 235 | + - peer0.org2.example.com |
| 236 | + - peer1.org2.example.com |
| 237 | + networks: |
| 238 | + default: |
| 239 | + aliases: |
| 240 | + - ${CORE_PEER_NETWORKID} |
0 commit comments