Skip to content

Instantly share code, notes, and snippets.

@mohammadobaid1
Last active December 11, 2018 18:02
Show Gist options
  • Save mohammadobaid1/680649302e9ff66df8ede01ac9df1b25 to your computer and use it in GitHub Desktop.
Save mohammadobaid1/680649302e9ff66df8ede01ac9df1b25 to your computer and use it in GitHub Desktop.
Peer.yaml
version : "3"
services:
deanpeerfirst:
image: hyperledger/fabric-peer:1.2.1
networks:
- fabric
ports:
- 7051:7051
- 7053:7053
depends_on:
- node_orderer1st #ordere endpoint url
- node_orderer2nd
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL= DEBUG
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=leader
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_ID=deanpeerfirst
- CORE_PEER_ADDRESS=deanpeerfirst:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=deanpeerfirst:7051
- CORE_PEER_LOCALMSPID=PeerMSP # MSPID which you declared in configtx.yaml file
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_STARTUPTIMEOUT=180s
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric # Name of overlay network which you are using in this swarm network
volumes:
- /var/run/:/host/var/run/
- ./localmsp:/etc/hyperledger/fabric/msp
- ./originalchannel.tx:/channel.tx # Channel creation file should be mounted in only one peer for channel creation purpose
deploy:
placement:
constraints: [node.hostname == hostname-of-swarm-node]
command: peer node start
deanpeersecond:
image: hyperledger/fabric-peer:1.2.1
networks:
- fabric
ports:
- 7055:7051
- 7057:7053
depends_on:
- node_orderer1st
- node_orderer2nd
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL= DEBUG
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=leader
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_ID=deanpeersecond
- CORE_PEER_ADDRESS=deanpeersecond:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=deanpeerfirst:7051
- CORE_PEER_LOCALMSPID=ABCMSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
- CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- CORE_CHAINCODE_STARTUPTIMEOUT=180s
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric
volumes:
- /var/run/:/host/var/run/
- ./crypto/peer2/:/etc/hyperledger/fabric/msp
deploy:
placement:
constraints: [node.hostname == hostname-of-swarm-node]
command: peer node start
networks:
fabric:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment