|
| 1 | +version: '2' |
| 2 | + |
| 3 | +services: |
| 4 | + |
| 5 | + zookeeper: |
| 6 | + container_name: zookeeper |
| 7 | + image: hyperledger/fabric-zookeeper |
| 8 | + restart: always |
| 9 | + |
| 10 | + kafka0: |
| 11 | + image: hyperledger/fabric-kafka |
| 12 | + container_name: kafka0 |
| 13 | + restart: always |
| 14 | + environment: |
| 15 | + - KAFKA_BROKER_ID=0 |
| 16 | + - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 |
| 17 | + - KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE=false |
| 18 | + - KAFKA_DEFAULT_REPLICATION_FACTOR=1 |
| 19 | + ports: |
| 20 | + - 9092:9092 |
| 21 | + depends_on: |
| 22 | + - zookeeper |
| 23 | + links: |
| 24 | + - zookeeper:zookeeper |
| 25 | + |
| 26 | + orderer.example.com: |
| 27 | + container_name: orderer.example.com |
| 28 | + image: hyperledger/fabric-orderer |
| 29 | + environment: |
| 30 | + - CONFIGTX_ORDERER_ORDERERTYPE=kafka |
| 31 | + - CONFIGTX_ORDERER_KAFKA_BROKERS=[kafka0:9092] |
| 32 | + - CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050] |
| 33 | + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 |
| 34 | + - ORDERER_GENERAL_LISTENPORT=7050 |
| 35 | + - ORDERER_GENERAL_LOGLEVEL=debug |
| 36 | + - ORDERER_GENERAL_LEDGERTYPE=ram |
| 37 | + - ORDERER_GENERAL_GENESISMETHOD=file |
| 38 | + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/orderer.block |
| 39 | + - ORDERER_GENERAL_QUEUESIZE=1000 |
| 40 | + - ORDERER_GENERAL_MAXWINDOWSIZE=1000 |
| 41 | + - ORDERER_RAMLEDGER_HISTORY_SIZE=100 |
| 42 | + - ORDERER_GENERAL_BATCHSIZE=10 |
| 43 | + - ORDERER_GENERAL_BATCHTIMEOUT=10s |
| 44 | + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp |
| 45 | + - ORDERER_GENERAL_LOCALMSPID=example.com |
| 46 | + - ORDERER_GENERAL_TLS_ENABLED=false |
| 47 | + volumes: |
| 48 | + - ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/config |
| 49 | + - ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/msp |
| 50 | + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer |
| 51 | + command: orderer |
| 52 | + ports: |
| 53 | + - '7050' |
| 54 | + depends_on: |
| 55 | + - kafka0 |
| 56 | + links: |
| 57 | + - kafka0:kafka0 |
| 58 | + |
| 59 | + peer0.org1.example.com: |
| 60 | + container_name: peer0.org1.example.com |
| 61 | + image: hyperledger/fabric-peer |
| 62 | + environment: |
| 63 | + - CORE_PEER_ID=vp0 |
| 64 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 |
| 65 | + - CORE_PEER_PROFILE_ENABLED=true |
| 66 | + - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
| 67 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 68 | + - CORE_PEER_LOCALMSPID=org1.example.com |
| 69 | + - CORE_NEXT=true |
| 70 | + - CORE_PEER_ENDORSER_ENABLED=true |
| 71 | + - CORE_PEER_GOSSIP_ORGLEADER=false |
| 72 | + - CORE_PEER_GOSSIP_USELEADERELECTION=true |
| 73 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 74 | + - CORE_LOGGING_LEVEL=DEBUG |
| 75 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 76 | + - CORE_PEER_TLS_ENABLED=false |
| 77 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 78 | + volumes: |
| 79 | + - ../configs:/var/hyperledger/configs |
| 80 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/var/hyperledger/msp |
| 81 | + - /var/run/docker.sock:/var/run/docker.sock |
| 82 | + ports: |
| 83 | + - '7051' |
| 84 | + - '7053' |
| 85 | + depends_on: |
| 86 | + - orderer.example.com |
| 87 | + command: peer node start --peer-defaultchain=false |
| 88 | + |
| 89 | + peer0.org2.example.com: |
| 90 | + container_name: peer0.org2.example.com |
| 91 | + image: hyperledger/fabric-peer |
| 92 | + environment: |
| 93 | + - CORE_PEER_ID=vp1 |
| 94 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 |
| 95 | + - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
| 96 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 97 | + - CORE_PEER_LOCALMSPID=org2.example.com |
| 98 | + - CORE_NEXT=true |
| 99 | + - CORE_PEER_ENDORSER_ENABLED=true |
| 100 | + - CORE_PEER_GOSSIP_ORGLEADER=false |
| 101 | + - CORE_PEER_GOSSIP_USELEADERELECTION=true |
| 102 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 103 | + - CORE_LOGGING_LEVEL=DEBUG |
| 104 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 105 | + - CORE_PEER_TLS_ENABLED=false |
| 106 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 107 | + volumes: |
| 108 | + - ../configs:/var/hyperledger/configs |
| 109 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/var/hyperledger/msp |
| 110 | + - /var/run/docker.sock:/var/run/docker.sock |
| 111 | + ports: |
| 112 | + - '7051' |
| 113 | + - '7053' |
| 114 | + depends_on: |
| 115 | + - orderer.example.com |
| 116 | + - peer0.org1.example.com |
| 117 | + command: peer node start --peer-defaultchain=false |
| 118 | + |
| 119 | + peer1.org1.example.com: |
| 120 | + container_name: peer1.org1.example.com |
| 121 | + image: hyperledger/fabric-peer |
| 122 | + environment: |
| 123 | + - CORE_PEER_ID=vp2 |
| 124 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:7051 |
| 125 | + - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
| 126 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 127 | + - CORE_PEER_LOCALMSPID=org1.example.com |
| 128 | + - CORE_NEXT=true |
| 129 | + - CORE_PEER_ENDORSER_ENABLED=true |
| 130 | + - CORE_PEER_GOSSIP_ORGLEADER=false |
| 131 | + - CORE_PEER_GOSSIP_USELEADERELECTION=true |
| 132 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 133 | + - CORE_LOGGING_LEVEL=DEBUG |
| 134 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 135 | + - CORE_PEER_TLS_ENABLED=false |
| 136 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 137 | + volumes: |
| 138 | + - ../configs:/var/hyperledger/configs |
| 139 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/var/hyperledger/msp |
| 140 | + - /var/run/docker.sock:/var/run/docker.sock |
| 141 | + ports: |
| 142 | + - '7051' |
| 143 | + - '7053' |
| 144 | + depends_on: |
| 145 | + - orderer.example.com |
| 146 | + - peer0.org1.example.com |
| 147 | + command: peer node start --peer-defaultchain=false |
| 148 | + |
| 149 | + peer1.org2.example.com: |
| 150 | + container_name: peer1.org2.example.com |
| 151 | + image: hyperledger/fabric-peer |
| 152 | + environment: |
| 153 | + - CORE_PEER_ID=vp3 |
| 154 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 |
| 155 | + - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050 |
| 156 | + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp |
| 157 | + - CORE_PEER_LOCALMSPID=org2.example.com |
| 158 | + - CORE_NEXT=true |
| 159 | + - CORE_PEER_ENDORSER_ENABLED=true |
| 160 | + - CORE_PEER_GOSSIP_ORGLEADER=false |
| 161 | + - CORE_PEER_GOSSIP_USELEADERELECTION=true |
| 162 | + - CORE_PEER_ADDRESSAUTODETECT=true |
| 163 | + - CORE_LOGGING_LEVEL=DEBUG |
| 164 | + - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} |
| 165 | + - CORE_PEER_TLS_ENABLED=false |
| 166 | + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true |
| 167 | + volumes: |
| 168 | + - ../configs:/var/hyperledger/configs |
| 169 | + - ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/var/hyperledger/msp |
| 170 | + - /var/run/docker.sock:/var/run/docker.sock |
| 171 | + ports: |
| 172 | + - '7051' |
| 173 | + - '7053' |
| 174 | + depends_on: |
| 175 | + - orderer.example.com |
| 176 | + - peer0.org1.example.com |
| 177 | + command: peer node start --peer-defaultchain=false |
0 commit comments