docker-compose-peer2.yaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. version: '2'
  2. services:
  3. couchdb2:
  4. container_name: couchdb2
  5. image: hyperledger/fabric-couchdb
  6. # Uncomment the port mapping if you want to expose the CouchDB service,
  7. # for example to utilize Fauxton User Interface in dev environments.
  8. volumes:
  9. - /var/hyperledger/couchdb2:/opt/couchdb/data
  10. ports:
  11. - 5984:5984
  12. peer2:
  13. container_name: peer2
  14. image: hyperledger/fabric-peer
  15. environment:
  16. - GRPC_TRACE=all
  17. - GRPC_VERBOSITY=debug
  18. - CORE_NEXT=true
  19. - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  20. - CORE_PEER_ID=peer2
  21. - CORE_PEER_ENDORSER_ENABLED=true
  22. - CORE_PEER_LOCALMSPID=Org1MSP
  23. - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
  24. - CORE_PEER_GOSSIP_USELEADERELECTION=true
  25. - CORE_PEER_GOSSIP_ORGLEADER=false
  26. - CORE_PEER_ADDRESS=peer2:7051
  27. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2:7051
  28. - CORE_PEER_TLS_ENABLED=true
  29. - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/server.key
  30. - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/server.crt
  31. - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca.crt
  32. # the following setting starts chaincode containers on the same
  33. # bridge network as the peers
  34. # https://docs.docker.com/compose/networking/
  35. - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
  36. - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=midea_default
  37. - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  38. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2:5984
  39. working_dir: /opt/gopath/src/github.com/hyperledger/fabric
  40. command: peer node start --peer-defaultchain=false
  41. extra_hosts:
  42. - "orderer0:10.16.80.209"
  43. - "peer0:10.16.80.210"
  44. - "peer1:10.16.80.211"
  45. - "peer2:10.16.80.212"
  46. - "peer3:10.16.80.213"
  47. ports:
  48. - 7051:7051
  49. - 7053:7053
  50. volumes:
  51. - /var/run/:/host/var/run/
  52. - ./crypto-config/peerOrganizations/peerOrg1/peers/peer2.peerOrg1/msp/:/etc/hyperledger/msp/peer
  53. - ./crypto-config/peerOrganizations/peerOrg1/peers/peer2.peerOrg1/tls/:/etc/hyperledger/tls
  54. depends_on:
  55. #- orderer0
  56. - couchdb2