
完成
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: ‘2’
services:
peer0.njupt.eduAli.cn:
container_name: peer0.njupt.eduAli.cn
image: hyperledger/fabric-peer:1.4.11
environment:
- CORE_PEER_ID=peer0.njupt.eduAli.cn
- CORE_PEER_ADDRESS=peer0.njupt.eduAli.cn:7051
- CORE_PEER_CHAINCODEADDRESS=peer0.njupt.eduAli.cn:7052
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.njupt.eduAli.cn:7051
- CORE_PEER_LOCALMSPID=njuptMSP
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=multipeer_default
#- CORE_LOGGING_LEVEL=ERROR
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: peer node start
volumes:
- /var/run/:/host/var/run/
- ./crypto-config/peerOrganizations/njupt.eduAli.cn/peers/peer0.njupt.eduAli.cn/msp:/etc/hyperledger/fabric/msp
- ./crypto-config/peerOrganizations/njupt.eduAli.cn/peers/peer0.njupt.eduAli.cn/tls:/etc/hyperledger/fabric/tls
ports:
- 7051:7051
- 7052:7052
- 7053:7053
extra_hosts:
- “orderer.eduAli.cn:192.168.195.155”
cli:
container_name: cli
image: hyperledger/fabric-tools:1.4.11
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.njupt.eduAli.cn:7051
- CORE_PEER_LOCALMSPID=njuptMSP
- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/njupt.eduAli.cn/peers/peer0.njupt.eduAli.cn/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/njupt.eduAli.cn/peers/peer0.njupt.eduAli.cn/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/njupt.eduAli.cn/peers/peer0.njupt.eduAli.cn/tls/ca.crt
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/njupt.eduAli.cn/users/Admin@njupt.eduAli.cn/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
volumes:
- /var/run/:/host/var/run/
- ./chaincode/go/:/opt/gopath/src/github.com/hyperledger/fabric/multipeer/chaincode/go
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
depends_on:
- peer0.njupt.eduAli.cn
extra_hosts:
- “orderer.eduAli.cn:192.168.1.113”
- “peer0.bupt.eduAli.cn:192.168.1.112”
- “peer0.njupt.eduAli.cn:192.168.1.103”