docker-compose-peer1.yaml 2.0 KB

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