|
| 1 | +version: '2' |
| 2 | + |
| 3 | +services: |
| 4 | + |
| 5 | + orderer.example.com: |
| 6 | + container_name: orderer.example.com |
| 7 | + image: hyperledger/fabric-orderer |
| 8 | + environment: |
| 9 | + - ORDERER_GENERAL_LOGLEVEL=debug |
| 10 | + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 |
| 11 | + - ORDERER_GENERAL_GENESISMETHOD=file |
| 12 | + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block |
| 13 | + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP |
| 14 | + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp |
| 15 | + # enabled TLS |
| 16 | + - ORDERER_GENERAL_TLS_ENABLED=true |
| 17 | + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key |
| 18 | + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt |
| 19 | + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] |
| 20 | + working_dir: /opt/gopath/src/github.com/hyperledger/fabric |
| 21 | + command: orderer |
| 22 | + volumes: |
| 23 | + - ../channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block |
| 24 | + - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp |
| 25 | + - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls |
| 26 | + ports: |
| 27 | + - 7050:7050 |
| 28 | + |
| 29 | +## To enable CouchDB as state database, uncomment the following sections of this file: |
| 30 | +## 1) couchdb containers |
| 31 | +## 2) peer environment variables CORE_LEDGER_STATE_STATEDATABASE and |
| 32 | +## CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS |
| 33 | +## 3) couch container names in "depends_on" section |
| 34 | + |
| 35 | +# couchdb0: |
| 36 | +# container_name: couchdb0 |
| 37 | +# image: hyperledger/fabric-couchdb |
| 38 | +## Uncomment the port mapping if you want to expose the CouchDB service, |
| 39 | +## for example to utilize Fauxton User Interface in dev environments. |
| 40 | +# ports: |
| 41 | +# - "5984:5984" |
| 42 | + |
| 43 | + peer0.org1.example.com: |
| 44 | + container_name: peer0.org1.example.com |
| 45 | + extends: |
| 46 | + file: peer-base.yaml |
| 47 | + service: peer-base |
| 48 | + environment: |
| 49 | + - CORE_PEER_ID=peer0.org1.example.com |
| 50 | + - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 |
| 51 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 |
| 52 | + - CORE_PEER_LOCALMSPID=Org1MSP |
| 53 | + # - CORE_LEDGER_STATE_STATEDATABASE=CouchDB |
| 54 | + # - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 |
| 55 | + volumes: |
| 56 | + - /var/run/:/host/var/run/ |
| 57 | + - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp |
| 58 | + - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls |
| 59 | + ports: |
| 60 | + - 7051:7051 |
| 61 | + - 7053:7053 |
| 62 | + #depends_on: |
| 63 | + # - couchdb0 |
| 64 | + |
| 65 | +# couchdb1: |
| 66 | +# container_name: couchdb1 |
| 67 | +# image: hyperledger/fabric-couchdb |
| 68 | +## Uncomment the port mapping if you want to expose the CouchDB service, |
| 69 | +## for example to utilize Fauxton User Interface in dev environments. |
| 70 | +# ports: |
| 71 | +# - "6984:5984" |
| 72 | + |
| 73 | + peer1.org1.example.com: |
| 74 | + container_name: peer1.org1.example.com |
| 75 | + extends: |
| 76 | + file: peer-base.yaml |
| 77 | + service: peer-base |
| 78 | + environment: |
| 79 | + - CORE_PEER_ID=peer1.org1.example.com |
| 80 | + - CORE_PEER_ADDRESS=peer1.org1.example.com:7051 |
| 81 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051 |
| 82 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 |
| 83 | + - CORE_PEER_LOCALMSPID=Org1MSP |
| 84 | + # - CORE_LEDGER_STATE_STATEDATABASE=CouchDB |
| 85 | + # - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984 |
| 86 | + volumes: |
| 87 | + - /var/run/:/host/var/run/ |
| 88 | + - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp |
| 89 | + - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls |
| 90 | + |
| 91 | + ports: |
| 92 | + - 8051:7051 |
| 93 | + - 8053:7053 |
| 94 | + #depends_on: |
| 95 | + # - couchdb1 |
| 96 | + |
| 97 | +# couchdb2: |
| 98 | +# container_name: couchdb2 |
| 99 | +# image: hyperledger/fabric-couchdb |
| 100 | +## Uncomment the port mapping if you want to expose the CouchDB service, |
| 101 | +## for example to utilize Fauxton User Interface in dev environments. |
| 102 | +# ports: |
| 103 | +# - "7984:5984" |
| 104 | + |
| 105 | + peer0.org2.example.com: |
| 106 | + container_name: peer0.org2.example.com |
| 107 | + extends: |
| 108 | + file: peer-base.yaml |
| 109 | + service: peer-base |
| 110 | + environment: |
| 111 | + - CORE_PEER_ID=peer0.org2.example.com |
| 112 | + - CORE_PEER_ADDRESS=peer0.org2.example.com:7051 |
| 113 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051 |
| 114 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 |
| 115 | + - CORE_PEER_LOCALMSPID=Org2MSP |
| 116 | + # - CORE_LEDGER_STATE_STATEDATABASE=CouchDB |
| 117 | + # - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2:5984 |
| 118 | + volumes: |
| 119 | + - /var/run/:/host/var/run/ |
| 120 | + - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp |
| 121 | + - ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls |
| 122 | + ports: |
| 123 | + - 9051:7051 |
| 124 | + - 9053:7053 |
| 125 | + #depends_on: |
| 126 | + # - couchdb2 |
| 127 | + |
| 128 | +# couchdb3: |
| 129 | +# container_name: couchdb3 |
| 130 | +# image: hyperledger/fabric-couchdb |
| 131 | +## Uncomment the port mapping if you want to expose the CouchDB service, |
| 132 | +## for example to utilize Fauxton User Interface in dev environments. |
| 133 | +# ports: |
| 134 | +# - "8984:5984" |
| 135 | + |
| 136 | + peer1.org2.example.com: |
| 137 | + container_name: peer1.org2.example.com |
| 138 | + extends: |
| 139 | + file: peer-base.yaml |
| 140 | + service: peer-base |
| 141 | + environment: |
| 142 | + - CORE_PEER_ID=peer1.org2.example.com |
| 143 | + - CORE_PEER_ADDRESS=peer1.org2.example.com:7051 |
| 144 | + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051 |
| 145 | + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:7051 |
| 146 | + - CORE_PEER_LOCALMSPID=Org2MSP |
| 147 | + # - CORE_LEDGER_STATE_STATEDATABASE=CouchDB |
| 148 | + # - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb3:5984 |
| 149 | + volumes: |
| 150 | + - /var/run/:/host/var/run/ |
| 151 | + - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp |
| 152 | + - ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls |
| 153 | + ports: |
| 154 | + - 10051:7051 |
| 155 | + - 10053:7053 |
| 156 | + #depends_on: |
| 157 | + # - couchdb3 |
0 commit comments