docker-compose-peer0.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. version: '2'
  2. services:
  3. ## To enable CouchDB as state database, uncomment the following sections of this file:
  4. ## 1) couchdb containers
  5. ## 2) peer environment variables CORE_LEDGER_STATE_STATEDATABASE and
  6. ## CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS
  7. ## 3) couch container names in "depends_on" section
  8. couchdb0:
  9. container_name: couchdb0
  10. image: hyperledger/fabric-couchdb
  11. # Uncomment the port mapping if you want to expose the CouchDB service,
  12. # for example to utilize Fauxton User Interface in dev environments.
  13. volumes:
  14. - /var/hyperledger/couchdb0:/opt/couchdb/data
  15. ports:
  16. - 5984:5984
  17. peer0:
  18. container_name: peer0
  19. extends:
  20. file: peer-base/peer-base.yaml
  21. service: peer-base
  22. environment:
  23. - CORE_PEER_ID=peer0
  24. - CORE_PEER_ADDRESS=peer0:7051
  25. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0:7051
  26. - CORE_PEER_LOCALMSPID=Org1MSP
  27. - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/msp/sampleconfig/tls_config/peer0Signer-peer0-peerOrg0-tls.crt
  28. - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/msp/sampleconfig/tls_config/peer0Signer-peer0-peerOrg0-tls.key
  29. - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/peerOrg0.pem
  30. - CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer0
  31. - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  32. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
  33. extra_hosts:
  34. - "orderer0:10.16.80.209"
  35. volumes:
  36. - /var/run/:/host/var/run/
  37. - ./crypto-config/peerOrganizations/peerOrg1/peers/peer0.peerOrg1:/etc/hyperledger/fabric/msp/sampleconfig
  38. - ./crypto-config/peerOrganizations/peerOrg1/msp/cacerts:/etc/hyperledger/tls
  39. ports:
  40. - 7051:7051
  41. - 7053:7053
  42. depends_on:
  43. - couchdb0