docker-compose-cli.yaml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. expose:
  55. - "7050" # Rest
  56. - "7051" # Grpc
  57. - "7052" # Peer CLI
  58. - "7053" # Peer Event
  59. - "7054" # eCAP
  60. - "7055" # eCAA
  61. - "7056" # tCAP
  62. - "7057" # eCAA
  63. - "7058" # tlsCAP
  64. - "7059" # tlsCAA
  65. volumes:
  66. - /var/run/docker.sock:/var/run/docker.sock
  67. - ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
  68. - ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
  69. ports:
  70. - 7051:7051
  71. - 7052:7052
  72. - 7053:7053
  73. command: peer node start
  74. extra_hosts:
  75. - "orderer.example.com:106.14.183.136"
  76. couchdb:
  77. container_name: couchdb
  78. image: hyperledger/fabric-couchdb:x86_64-1.0.5
  79. ports:
  80. - 5984:5984
  81. environment:
  82. DB_URL: http://localhost:5984/member_db