Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Copyright IBM Corp All Rights Reserved
- #
- # SPDX-License-Identifier: Apache-2.0
- #
- version: '2'
- networks:
- basic:
- services:
- ca.cik.bg:
- image: hyperledger/fabric-ca
- environment:
- - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- - FABRIC_CA_SERVER_CA_NAME=ca.cik.bg
- - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.cik.bg-cert.pem
- - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/d3f5a04ed6720392257ab9903355974c258ec3de253a92c779eff0cc32082d7e_sk
- ports:
- - "7054:7054"
- 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'
- volumes:
- - ./crypto-config/peerOrganizations/cik.bg/ca/:/etc/hyperledger/fabric-ca-server-config
- container_name: ca.cik.bg
- networks:
- - basic
- orderer.cik.bg:
- container_name: orderer.cik.bg
- image: hyperledger/fabric-orderer
- environment:
- - ORDERER_GENERAL_LOGLEVEL=debug
- - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- - ORDERER_GENERAL_GENESISMETHOD=file
- - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- - ORDERER_GENERAL_LOCALMSPID=CIKOrdererMSP
- - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
- working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
- command: orderer
- ports:
- - 7050:7050
- volumes:
- - ./config/:/etc/hyperledger/configtx
- - ./crypto-config/ordererOrganizations/cik.bg/orderers/orderer.cik.bg/:/etc/hyperledger/msp/orderer
- - ./crypto-config/peerOrganizations/cik.bg/peers/peer1.cik.bg/:/etc/hyperledger/msp/peerOrg1
- networks:
- - basic
- peer1.cik.bg:
- container_name: peer1.cik.bg
- image: hyperledger/fabric-peer
- environment:
- - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- - CORE_PEER_ID=peer1.cik.bg
- - CORE_LOGGING_PEER=debug
- - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
- - CORE_PEER_LOCALMSPID=CIKMSP
- - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- - CORE_PEER_ADDRESS=peer1.cik.bg:7051
- # # 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=${COMPOSE_PROJECT_NAME}_basic
- - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
- - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984
- # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD
- # provide the credentials for ledger to connect to CouchDB. The username and password must
- # match the username and password set for the associated CouchDB.
- - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
- - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
- working_dir: /opt/gopath/src/github.com/hyperledger/fabric
- command: peer node start
- # command: peer node start --peer-chaincodedev=true
- ports:
- - 7051:7051
- - 7053:7053
- volumes:
- - /var/run/:/host/var/run/
- - ./crypto-config/peerOrganizations/cik.bg/peers/peer1.cik.bg/msp:/etc/hyperledger/msp/peer
- - ./crypto-config/peerOrganizations/cik.bg/users:/etc/hyperledger/msp/users
- - ./config:/etc/hyperledger/configtx
- depends_on:
- - orderer.cik.bg
- - couchdb
- networks:
- - basic
- couchdb:
- container_name: couchdb
- image: hyperledger/fabric-couchdb
- # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password
- # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode.
- environment:
- - COUCHDB_USER=
- - COUCHDB_PASSWORD=
- ports:
- - 5984:5984
- networks:
- - basic
- cli:
- container_name: 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=peer1.cik.bg:7051
- - CORE_PEER_LOCALMSPID=CIKMSP
- - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/cik.bg/users/Admin@cik.bg/msp
- - CORE_CHAINCODE_KEEPALIVE=10
- working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
- command: /bin/bash
- volumes:
- - /var/run/:/host/var/run/
- - ./../chaincode/:/opt/gopath/src/github.com/
- - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- networks:
- - basic
- #depends_on:
- # - orderer.example.com
- # - peer1.org1.example.com
- # - couchdb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement