Skip to content

Instantly share code, notes, and snippets.

@mohammadobaid1
Last active December 11, 2018 18:09
Show Gist options
  • Save mohammadobaid1/5f8dfed4761ad8c986689f3f3d453640 to your computer and use it in GitHub Desktop.
Save mohammadobaid1/5f8dfed4761ad8c986689f3f3d453640 to your computer and use it in GitHub Desktop.

Revisions

  1. mohammadobaid1 revised this gist Dec 11, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions cli.yaml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    version : "3"

    cli:
    image: hyperledger/fabric-tools
    tty: true
  2. mohammadobaid1 created this gist Dec 11, 2018.
    61 changes: 61 additions & 0 deletions cli.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,61 @@
    cli:
    image: hyperledger/fabric-tools
    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=deanpeersecond:7051
    - CORE_PEER_LOCALMSPID=DeanMSP #mspid of peer which you defined in configtx.yaml
    - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
    - CORE_CHAINCODE_KEEPALIVE=10
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: /bin/bash
    volumes:
    - ./crypto-material/peer2/:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
    - /var/run/:/host/var/run/
    - ./chaincode:/opt/gopath/src/github.com/chaincode
    networks:
    - fabric

    deploy:
    placement:
    constraints: [node.hostname == hostname-of-swarm-node]




    peercli:
    image: hyperledger/fabric-tools
    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=deanpeerfirst:7051
    - CORE_PEER_LOCALMSPID=DeanMSP
    - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
    - CORE_CHAINCODE_KEEPALIVE=10
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: /bin/bash
    volumes:
    - ./crypto-material/peer1/:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
    - /var/run/:/host/var/run/
    - ./chaincode:/opt/gopath/src/github.com/chaincode
    # - ./channel.tx:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel.tx
    networks:
    - fabric

    deploy:
    placement:
    constraints: [node.hostname == hostname-of-swarmnode]





    networks:
    fabric:
    external: true