Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1.  
  2. version: "2"
  3.  
  4. networks:
  5. ? basic
  6.  
  7. services:
  8. ca.example.com:
  9. image: hyperledger/fabric-ca
  10. environment:
  11. - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  12. - FABRIC_CA_SERVER_CA_NAME=ca.example.com
  13. - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
  14. - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c_sk
  15. ports:
  16. - "7054:7054"
  17. command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
  18. volumes:
  19. - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
  20. container_name: ca.example.com
  21. networks:
  22. - basic
  23.  
  24. orderer.example.com:
  25. container_name: orderer.example.com
  26. image: hyperledger/fabric-orderer
  27. environment:
  28. - ORDERER_GENERAL_LOGLEVEL=debug
  29. - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
  30. - ORDERER_GENERAL_GENESISMETHOD=file
  31. - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
  32. - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
  33. - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
  34. working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
  35. command: orderer
  36. ports:
  37. - 7050:7050
  38. volumes:
  39. - ./config/:/etc/hyperledger/configtx
  40. - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer
  41. - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1
  42. networks:
  43. - basic
  44.  
  45. peer0.org1.example.com:
  46. container_name: peer0.org1.example.com
  47. image: hyperledger/fabric-peer
  48. environment:
  49. - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  50. - CORE_PEER_ID=peer0.org1.example.com
  51. - CORE_LOGGING_PEER=debug
  52. - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
  53. - CORE_PEER_LOCALMSPID=Org1MSP
  54. - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
  55. - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
  56. # # the following setting starts chaincode containers on the same
  57. # # bridge network as the peers
  58. # # https://docs.docker.com/compose/networking/
  59. - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic
  60. - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  61. - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
  62. # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
  63. # provide the credentials for ledger to connect to CouchDB. The username and password must
  64. # match the username and password set for the associated CouchDB.
  65. - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
  66. - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
  67. working_dir: /opt/gopath/src/github.com/hyperledger/fabric
  68. command: peer node start
  69. # command: peer node start --peer-chaincodedev=true
  70. ports:
  71. - 7051:7051
  72. - 7053:7053
  73. volumes:
  74. - /var/run/:/host/var/run/
  75. - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer
  76. - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users
  77. - ./config:/etc/hyperledger/configtx
  78. depends_on:
  79. - orderer.example.com
  80. - couchdb
  81. networks:
  82. - basic
  83.  
  84. couchdb:
  85. container_name: couchdb
  86. image: hyperledger/fabric-couchdb
  87. # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  88. # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
  89. environment:
  90. - COUCHDB_USER=
  91. - COUCHDB_PASSWORD=
  92. ports:
  93. - 5984:5984
  94. networks:
  95. - basic
  96.  
  97. cli:
  98. container_name: cli
  99. image: hyperledger/fabric-tools
  100. tty: true
  101. environment:
  102. - GOPATH=/opt/gopath
  103. - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  104. - CORE_LOGGING_LEVEL=DEBUG
  105. - CORE_PEER_ID=cli
  106. - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
  107. - CORE_PEER_LOCALMSPID=Org1MSP
  108. - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
  109. - CORE_CHAINCODE_KEEPALIVE=10
  110. working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
  111. command: /bin/bash
  112. volumes:
  113. - /var/run/:/host/var/run/
  114. - ./../chaincode/:/opt/gopath/src/github.com/
  115. - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
  116. networks:
  117. - basic
  118. #depends_on:
  119. # - orderer.example.com
  120. # - peer0.org1.example.com
  121. # - couchdb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement