docker-compose-peer0.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. version: '2'
  2. services:
  3. cli: # client node
  4. image: hyperledger/fabric-tools:x86_64-1.0.5
  5. restart: always
  6. tty: true
  7. container_name: fabric-cli
  8. hostname: fabric-cli
  9. environment:
  10. - CORE_PEER_ID=fabric-cli
  11. - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
  12. - CORE_PEER_LOCALMSPID=Org1MSP
  13. - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
  14. - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
  15. - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
  16. - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
  17. - CORE_PEER_TLS_ENABLED=true
  18. - CORE_LOGGING_LEVEL=DEBUG
  19. - CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
  20. - ORDERER_CA=/etc/hyperledger/fabric/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  21. working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
  22. command: bash -c 'cd /tmp; source scripts/func.sh; while true; do sleep 20170504; done'
  23. volumes:
  24. - ./scripts:/tmp/scripts
  25. - ./solo/channel-artifacts:/tmp/channel-artifacts
  26. - ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
  27. - ./solo/crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
  28. - ./solo/crypto-config:/etc/hyperledger/fabric/crypto-config
  29. - ./solo/examples:/opt/gopath/src/examples
  30. peer0.org1.example.com:
  31. image: hyperledger/fabric-peer:x86_64-1.0.5
  32. restart: always
  33. container_name: peer0.org1.example.com
  34. hostname: peer0.org1.example.com
  35. environment:
  36. - CORE_PEER_ID=peer0.org1.example.com
  37. - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
  38. - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052
  39. - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
  40. - CORE_PEER_LOCALMSPID=Org1MSP
  41. - CORE_PEER_TLS_ENABLED=true
  42. - CORE_PEER_ADDRESSAUTODETECT=false
  43. - CORE_LOGGING_LEVEL=DEBUG
  44. - CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
  45. - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v105_default # uncomment this to use specific network
  46. - CORE_PEER_GOSSIP_USELEADERELECTION=true
  47. - CORE_PEER_GOSSIP_ORGLEADER=false # this node is the group leader, default to false
  48. - CORE_PEER_PROFILE_ENABLED=false
  49. - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
  50. - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
  51. - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
  52. - CORE_CHIANCODE_LOGGING_LEVEL=DEBUG
  53. - CORE_CHIANCODE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
  54. volumes:
  55. - /var/run/docker.sock:/var/run/docker.sock
  56. - ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
  57. - ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
  58. ports:
  59. - 7051:7051
  60. - 7052:7052
  61. - 7053:7053
  62. command: peer node start
  63. extra_hosts:
  64. - "orderer.example.com:106.14.183.136"
  65. couchdb:
  66. container_name: couchdb
  67. image: hyperledger/fabric-couchdb:x86_64-1.0.5
  68. ports:
  69. - 5984:5984
  70. environment:
  71. DB_URL: http://localhost:5984/member_db