docker-compose-peer0.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. version: '2'
  2. services:
  3. couchdb0:
  4. container_name: couchdb0
  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/couchdb0:/opt/couchdb/data
  10. ports:
  11. - 5984:5984
  12. peer0:
  13. container_name: peer0
  14. image: hyperledger/fabric-peer
  15. environment:
  16. - CORE_LOGGING_LEVEL=DEBUG
  17. - CORE_NEXT=true
  18. - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  19. - CORE_PEER_ID=peer0
  20. - CORE_PEER_ENDORSER_ENABLED=true
  21. - CORE_PEER_LOCALMSPID=Org1MSP
  22. - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
  23. - CORE_PEER_GOSSIP_ORGLEADER=true
  24. - CORE_PEER_ADDRESS=peer0:7051
  25. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0:7051
  26. - CORE_PEER_TLS_ENABLED=true
  27. - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem
  28. - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/cert.pem
  29. - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/ca-cert.pem
  30. # the following setting starts chaincode containers on the same
  31. # bridge network as the peers
  32. # https://docs.docker.com/compose/networking/
  33. - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
  34. - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=midea_default
  35. - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  36. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
  37. working_dir: /opt/gopath/src/github.com/hyperledger/fabric
  38. command: peer node start --peer-defaultchain=false
  39. extra_hosts:
  40. - "orderer0:10.16.80.209"
  41. - "peer0:10.16.80.210"
  42. - "peer1:10.16.80.211"
  43. - "peer2:10.16.80.212"
  44. - "peer3:10.16.80.213"
  45. ports:
  46. - 7051:7051
  47. - 7053:7053
  48. volumes:
  49. - /var/run/:/host/var/run/
  50. - ./channel/crypto-config/peerOrganizations/peerOrg1/peers/peerOrg1Peer1/:/etc/hyperledger/msp/peer
  51. - ./tls/peers/peer0:/etc/hyperledger/tls
  52. depends_on:
  53. #- orderer0
  54. - couchdb0