Advertisement
Guest User

Untitled

a guest
Mar 7th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.77 KB | None | 0 0
  1. #
  2. # Copyright IBM Corp All Rights Reserved
  3. #
  4. # SPDX-License-Identifier: Apache-2.0
  5. #
  6. version: '2'
  7.  
  8. networks:
  9.   basic:
  10. services:
  11.   ca.cik.bg:
  12.     image: hyperledger/fabric-ca
  13.     environment:
  14.      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
  15.       - FABRIC_CA_SERVER_CA_NAME=ca.cik.bg
  16.       - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.cik.bg-cert.pem
  17.       - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/d3f5a04ed6720392257ab9903355974c258ec3de253a92c779eff0cc32082d7e_sk
  18.     ports:
  19.      - "7054:7054"
  20.     command: sh -c 'cp /etc/hyperledger/fabric-ca-server-config/fabric-ca-server-config.yaml /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml & fabric-ca-server start -b ca.cik.bg:vertystrongpassword -d'
  21.     volumes:
  22.      - ./crypto-config/peerOrganizations/cik.bg/ca/:/etc/hyperledger/fabric-ca-server-config
  23.     container_name: ca.cik.bg
  24.     networks:
  25.      - basic
  26.  
  27.   orderer.cik.bg:
  28.     container_name: orderer.cik.bg
  29.     image: hyperledger/fabric-orderer
  30.     environment:
  31.      - ORDERER_GENERAL_LOGLEVEL=debug
  32.       - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
  33.       - ORDERER_GENERAL_GENESISMETHOD=file
  34.       - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
  35.       - ORDERER_GENERAL_LOCALMSPID=CIKOrdererMSP
  36.       - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
  37.     working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
  38.     command: orderer
  39.     ports:
  40.      - 7050:7050
  41.     volumes:
  42.        - ./config/:/etc/hyperledger/configtx
  43.         - ./crypto-config/ordererOrganizations/cik.bg/orderers/orderer.cik.bg/:/etc/hyperledger/msp/orderer
  44.         - ./crypto-config/peerOrganizations/cik.bg/peers/peer1.cik.bg/:/etc/hyperledger/msp/peerOrg1
  45.     networks:
  46.      - basic
  47.  
  48.   peer1.cik.bg:
  49.     container_name: peer1.cik.bg
  50.     image: hyperledger/fabric-peer
  51.     environment:
  52.      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  53.       - CORE_PEER_ID=peer1.cik.bg
  54.       - CORE_LOGGING_PEER=debug
  55.       - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
  56.       - CORE_PEER_LOCALMSPID=CIKMSP
  57.       - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
  58.       - CORE_PEER_ADDRESS=peer1.cik.bg:7051
  59.       # # the following setting starts chaincode containers on the same
  60.       # # bridge network as the peers
  61.       # # https://docs.docker.com/compose/networking/
  62.       - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic
  63.       - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
  64.       - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
  65.       # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
  66.       # provide the credentials for ledger to connect to CouchDB.  The username and password must
  67.       # match the username and password set for the associated CouchDB.
  68.       - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
  69.       - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
  70.     working_dir: /opt/gopath/src/github.com/hyperledger/fabric
  71.     command: peer node start
  72.     # command: peer node start --peer-chaincodedev=true
  73.     ports:
  74.      - 7051:7051
  75.       - 7053:7053
  76.     volumes:
  77.        - /var/run/:/host/var/run/
  78.         - ./crypto-config/peerOrganizations/cik.bg/peers/peer1.cik.bg/msp:/etc/hyperledger/msp/peer
  79.         - ./crypto-config/peerOrganizations/cik.bg/users:/etc/hyperledger/msp/users
  80.         - ./config:/etc/hyperledger/configtx
  81.     depends_on:
  82.      - orderer.cik.bg
  83.       - couchdb
  84.     networks:
  85.      - basic
  86.  
  87.   couchdb:
  88.     container_name: couchdb
  89.     image: hyperledger/fabric-couchdb
  90.     # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
  91.     # for CouchDB.  This will prevent CouchDB from operating in an "Admin Party" mode.
  92.     environment:
  93.      - COUCHDB_USER=
  94.       - COUCHDB_PASSWORD=
  95.     ports:
  96.      - 5984:5984
  97.     networks:
  98.      - basic
  99.  
  100.   cli:
  101.     container_name: cli
  102.     image: hyperledger/fabric-tools
  103.     tty: true
  104.     environment:
  105.      - GOPATH=/opt/gopath
  106.       - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
  107.       - CORE_LOGGING_LEVEL=DEBUG
  108.       - CORE_PEER_ID=cli
  109.       - CORE_PEER_ADDRESS=peer1.cik.bg:7051
  110.       - CORE_PEER_LOCALMSPID=CIKMSP
  111.       - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/cik.bg/users/Admin@cik.bg/msp
  112.       - CORE_CHAINCODE_KEEPALIVE=10
  113.     working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
  114.     command: /bin/bash
  115.     volumes:
  116.        - /var/run/:/host/var/run/
  117.         - ./../chaincode/:/opt/gopath/src/github.com/
  118.         - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
  119.     networks:
  120.        - basic
  121.     #depends_on:
  122.     #  - orderer.example.com
  123.     #  - peer1.org1.example.com
  124.     #  - couchdb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement