fabric docker配置文件---启用ca 选择couchdb数据库
示例配置文件中 5个组织 每个组织下两个节点 共10个节点
每个节点配置一个couchdb数据库 共配置10个数据库couch节点
每个组织启动一个ca节点 共5个ca节点
1 docker-compose-cli.yaml文件 cli启用tls服务
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#version: '2'volumes:orderer.example.com:peer0.org1.example.com:peer1.org1.example.com:peer0.org2.example.com:peer1.org2.example.com:peer0.org3.example.com:peer1.org3.example.com:peer0.org4.example.com:peer1.org4.example.com:peer0.org5.example.com:peer1.org5.example.com:networks:byfn:services:orderer.example.com:extends:file: base/docker-compose-base.yamlservice: orderer.example.comcontainer_name: orderer.example.comnetworks:- byfncouchdb0:container_name: couchdb0image: hyperledger/fabric-couchdb:latest# 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "5984:5984"networks:- byfncouchdb1:container_name: couchdb1image: hyperledger/fabric-couchdb:latest# 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "6984:5984"networks:- byfncouchdb2:container_name: couchdb2image: hyperledger/fabric-couchdb:latest# 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "7984:5984"networks:- byfncouchdb3:container_name: couchdb3image: 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "8984:5984"networks:- byfncouchdb4:container_name: couchdb4image: hyperledger/fabric-couchdb:latest# 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "9984:5984"networks:- byfncouchdb5:container_name: couchdb5image: 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "10984:5984"networks:- byfncouchdb6:container_name: couchdb6image: hyperledger/fabric-couchdb:latest# 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "11984:5984"networks:- byfncouchdb7:container_name: couchdb7image: 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "12984:5984"networks:- byfncouchdb8:container_name: couchdb8image: 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "13984:5984"networks:- byfncouchdb9:container_name: couchdb9image: 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=# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,# for example map it to utilize Fauxton User Interface in dev environments.ports:- "14984:5984"networks:- byfnpeer0.org1.example.com:container_name: peer0.org1.example.comextends:file: base/docker-compose-base.yamlservice: peer0.org1.example.comnetworks:- byfndepends_on:- couchdb0peer1.org1.example.com:container_name: peer1.org1.example.comextends:file: base/docker-compose-base.yamlservice: peer1.org1.example.comnetworks:- byfndepends_on:- couchdb1peer0.org2.example.com:container_name: peer0.org2.example.comextends:file: base/docker-compose-base.yamlservice: peer0.org2.example.comnetworks:- byfndepends_on:- couchdb2peer1.org2.example.com:container_name: peer1.org2.example.comextends:file: base/docker-compose-base.yamlservice: peer1.org2.example.comnetworks:- byfndepends_on:- couchdb3peer0.org3.example.com:container_name: peer0.org3.example.comextends:file: base/docker-compose-base.yamlservice: peer0.org3.example.comnetworks:- byfndepends_on:- couchdb4peer1.org3.example.com:container_name: peer1.org3.example.comextends:file: base/docker-compose-base.yamlservice: peer1.org3.example.comnetworks:- byfndepends_on:- couchdb5peer0.org4.example.com:container_name: peer0.org4.example.comextends:file: base/docker-compose-base.yamlservice: peer0.org4.example.comnetworks:- byfndepends_on:- couchdb6peer1.org4.example.com:container_name: peer1.org4.example.comextends:file: base/docker-compose-base.yamlservice: peer1.org4.example.comnetworks:- byfndepends_on:- couchdb7peer0.org5.example.com:container_name: peer0.org5.example.comextends:file: base/docker-compose-base.yamlservice: peer0.org5.example.comnetworks:- byfndepends_on:- couchdb8peer1.org5.example.com:container_name: peer1.org5.example.comextends:file: base/docker-compose-base.yamlservice: peer1.org5.example.comnetworks:- byfndepends_on:- couchdb9cli:container_name: cliimage: hyperledger/fabric-tools:$IMAGE_TAGtty: truestdin_open: trueenvironment:- SYS_CHANNEL=$SYS_CHANNEL- GOPATH=/opt/gopath- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock#- FABRIC_LOGGING_SPEC=DEBUG- FABRIC_LOGGING_SPEC=INFO- ORDERER_GENERAL_TLS_ENABLED=true- CORE_PEER_ID=cli- CORE_PEER_ADDRESS=peer0.org1.example.com:7051- CORE_PEER_LOCALMSPID=Org1MSP- CORE_PEER_TLS_ENABLED=true- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/mspworking_dir: /opt/gopath/src/github.com/hyperledger/fabric/peercommand: /bin/bashvolumes:- /var/run/:/host/var/run/- ./../chaincode/:/opt/gopath/src/github.com/chaincode- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifactsdepends_on:- orderer.example.com- peer0.org1.example.com- peer1.org1.example.com- peer0.org2.example.com- peer1.org2.example.com- peer0.org3.example.com- peer1.org3.example.com- peer0.org4.example.com- peer1.org4.example.com- peer0.org5.example.com- peer1.org5.example.comnetworks:- byfn
2 base/docker-compose-base.yaml文件 orderer启用tls服务
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:orderer.example.com:container_name: orderer.example.comextends:file: peer-base.yamlservice: orderer-baseenvironment:- ORDERER_GENERAL_TLS_ENABLED=truevolumes:- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp- ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls- orderer.example.com:/var/hyperledger/production/ordererports:- 7050:7050peer0.org1.example.com:container_name: peer0.org1.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer0.org1.example.com- CORE_PEER_ADDRESS=peer0.org1.example.com:7051- CORE_PEER_LISTENADDRESS=0.0.0.0:7051- CORE_PEER_CHAINCODEADDRESS=peer0.org1.example.com:7052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051- CORE_PEER_LOCALMSPID=Org1MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls- peer0.org1.example.com:/var/hyperledger/productionports:- 7051:7051peer1.org1.example.com:container_name: peer1.org1.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer1.org1.example.com- CORE_PEER_ADDRESS=peer1.org1.example.com:8051- CORE_PEER_LISTENADDRESS=0.0.0.0:8051- CORE_PEER_CHAINCODEADDRESS=peer1.org1.example.com:8052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051- CORE_PEER_LOCALMSPID=Org1MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls- peer1.org1.example.com:/var/hyperledger/productionports:- 8051:8051peer0.org2.example.com:container_name: peer0.org2.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer0.org2.example.com- CORE_PEER_ADDRESS=peer0.org2.example.com:9051- CORE_PEER_LISTENADDRESS=0.0.0.0:9051- CORE_PEER_CHAINCODEADDRESS=peer0.org2.example.com:9052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:9051- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:10051- CORE_PEER_LOCALMSPID=Org2MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb2: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/tls- peer0.org2.example.com:/var/hyperledger/productionports:- 9051:9051peer1.org2.example.com:container_name: peer1.org2.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer1.org2.example.com- CORE_PEER_ADDRESS=peer1.org2.example.com:10051- CORE_PEER_LISTENADDRESS=0.0.0.0:10051- CORE_PEER_CHAINCODEADDRESS=peer1.org2.example.com:10052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:10051- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:9051- CORE_PEER_LOCALMSPID=Org2MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb3: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/tls- peer1.org2.example.com:/var/hyperledger/productionports:- 10051:10051peer0.org3.example.com:container_name: peer0.org3.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer0.org3.example.com- CORE_PEER_ADDRESS=peer0.org3.example.com:11051- CORE_PEER_LISTENADDRESS=0.0.0.0:11051- CORE_PEER_CHAINCODEADDRESS=peer0.org3.example.com:10052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:10052- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org3.example.com:12051- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:11051- CORE_PEER_LOCALMSPID=Org3MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb4: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls:/etc/hyperledger/fabric/tls- peer0.org3.example.com:/var/hyperledger/productionports:- 11051:11051peer1.org3.example.com:container_name: peer1.org3.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer1.org3.example.com- CORE_PEER_ADDRESS=peer1.org3.example.com:12051- CORE_PEER_LISTENADDRESS=0.0.0.0:12051- CORE_PEER_CHAINCODEADDRESS=peer1.org3.example.com:12052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:12052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org3.example.com:12051- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org3.example.com:11051- CORE_PEER_LOCALMSPID=Org3MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb5: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls:/etc/hyperledger/fabric/tls- peer1.org3.example.com:/var/hyperledger/productionports:- 12051:12051peer0.org4.example.com:container_name: peer0.org4.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer0.org4.example.com- CORE_PEER_ADDRESS=peer0.org4.example.com:13051- CORE_PEER_LISTENADDRESS=0.0.0.0:13051- CORE_PEER_CHAINCODEADDRESS=peer0.org4.example.com:13052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:13052- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org4.example.com:14051- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org4.example.com:13051- CORE_PEER_LOCALMSPID=Org4MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb6: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls:/etc/hyperledger/fabric/tls- peer0.org4.example.com:/var/hyperledger/productionports:- 13051:13051peer1.org4.example.com:container_name: peer1.org4.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer1.org4.example.com- CORE_PEER_ADDRESS=peer1.org4.example.com:14051- CORE_PEER_LISTENADDRESS=0.0.0.0:14051- CORE_PEER_CHAINCODEADDRESS=peer1.org4.example.com:14052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:14052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org4.example.com:14051- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org4.example.com:13051- CORE_PEER_LOCALMSPID=Org4MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb7: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org4.example.com/peers/peer1.org4.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org4.example.com/peers/peer1.org4.example.com/tls:/etc/hyperledger/fabric/tls- peer1.org4.example.com:/var/hyperledger/productionports:- 14051:14051peer0.org5.example.com:container_name: peer0.org5.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer0.org5.example.com- CORE_PEER_ADDRESS=peer0.org5.example.com:15051- CORE_PEER_LISTENADDRESS=0.0.0.0:15051- CORE_PEER_CHAINCODEADDRESS=peer0.org5.example.com:15052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:15052- CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org5.example.com:16051- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org5.example.com:15051- CORE_PEER_LOCALMSPID=Org5MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb8: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org5.example.com/peers/peer0.org5.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org5.example.com/peers/peer0.org5.example.com/tls:/etc/hyperledger/fabric/tls- peer0.org5.example.com:/var/hyperledger/productionports:- 15051:15051peer1.org5.example.com:container_name: peer1.org5.example.comextends:file: peer-base.yamlservice: peer-baseenvironment:- CORE_PEER_ID=peer1.org5.example.com- CORE_PEER_ADDRESS=peer1.org5.example.com:16051- CORE_PEER_LISTENADDRESS=0.0.0.0:16051- CORE_PEER_CHAINCODEADDRESS=peer1.org5.example.com:16052- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:16052- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org5.example.com:16051- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org5.example.com:15051- CORE_PEER_LOCALMSPID=Org5MSP- CORE_LEDGER_STATE_STATEDATABASE=CouchDB- CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb9: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=volumes:- /var/run/:/host/var/run/- ../crypto-config/peerOrganizations/org5.example.com/peers/peer1.org5.example.com/msp:/etc/hyperledger/fabric/msp- ../crypto-config/peerOrganizations/org5.example.com/peers/peer1.org5.example.com/tls:/etc/hyperledger/fabric/tls- peer1.org5.example.com:/var/hyperledger/productionports:- 16051:16051
3 base/peer-base.yaml无需改动 开启tls服务
4 docker-compose-ca.yaml配置文件 开启tls服务
version: '2'networks:byfn:services:ca.org1.example.com:image: hyperledger/fabric-ca:latestenvironment:- FABRIC_CA_HOME=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/ca- FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com- FABRIC_CA_SERVER_TLS_ENABLED=true- FABRIC_CA_SERVER_TLS_CERTFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem- FABRIC_CA_SERVER_TLS_KEYFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/ca/1ece556198c7ab0cb6b38464bbf037b5a3b8b8c64fc6828280c1021ea0f894bf_sk- FABRIC_CA_SERVER_PORT=7054ports:- "7054:7054"command: sh -c 'fabric-ca-server start --ca.certfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem --ca.keyfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/ca/1ece556198c7ab0cb6b38464bbf037b5a3b8b8c64fc6828280c1021ea0f894bf_sk -b admin:adminpw -d'volumes:- ./crypto-config/peerOrganizations/org1.example.com/ca/:/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/cacontainer_name: ca.org1.example.comnetworks:- byfnca.org2.example.com:image: hyperledger/fabric-ca:latestenvironment:- FABRIC_CA_HOME=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/ca- FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com- FABRIC_CA_SERVER_TLS_ENABLED=true- FABRIC_CA_SERVER_TLS_CERTFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem- FABRIC_CA_SERVER_TLS_KEYFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/ca/d92ea8f908c27134b536c808993f7d383d9eae17552245f45e4ceff34ad958bd_sk- FABRIC_CA_SERVER_PORT=8054ports:- "8054:8054"command: sh -c 'fabric-ca-server start --ca.certfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem --ca.keyfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/ca/d92ea8f908c27134b536c808993f7d383d9eae17552245f45e4ceff34ad958bd_sk -b admin:adminpw -d'volumes:- ./crypto-config/peerOrganizations/org2.example.com/ca/:/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/cacontainer_name: ca.org2.example.comnetworks:- byfnca.org3.example.com:image: hyperledger/fabric-ca:latestenvironment:- FABRIC_CA_HOME=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/ca- FABRIC_CA_SERVER_CA_NAME=ca.org3.example.com- FABRIC_CA_SERVER_TLS_ENABLED=true- FABRIC_CA_SERVER_TLS_CERTFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem- FABRIC_CA_SERVER_TLS_KEYFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/ca/bfbb2c909ce610fe4439160e5c9196bfa437cccb75e28a79e2da0aa9fd0fd7bd_sk- FABRIC_CA_SERVER_PORT=9054ports:- "9054:9054"command: sh -c 'fabric-ca-server start --ca.certfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem --ca.keyfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/ca/bfbb2c909ce610fe4439160e5c9196bfa437cccb75e28a79e2da0aa9fd0fd7bd_sk -b admin:adminpw -d'volumes:- ./crypto-config/peerOrganizations/org3.example.com/ca/:/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org3.example.com/cacontainer_name: ca.org3.example.com networks:- byfnca.org4.example.com:image: hyperledger/fabric-ca:latestenvironment:- FABRIC_CA_HOME=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/ca- FABRIC_CA_SERVER_CA_NAME=ca.org4.example.com- FABRIC_CA_SERVER_TLS_ENABLED=true- FABRIC_CA_SERVER_TLS_CERTFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/ca/ca.org4.example.com-cert.pem- FABRIC_CA_SERVER_TLS_KEYFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/ca/903896d2eac31b75bdbfaba5a8c3c762e281c4bb06cf27bb4d2f1d768337dbda_sk- FABRIC_CA_SERVER_PORT=10054ports:- "10054:10054"command: sh -c 'fabric-ca-server start --ca.certfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/ca/ca.org4.example.com-cert.pem --ca.keyfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/ca/903896d2eac31b75bdbfaba5a8c3c762e281c4bb06cf27bb4d2f1d768337dbda_sk -b admin:adminpw -d'volumes:- ./crypto-config/peerOrganizations/org4.example.com/ca/:/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org4.example.com/cacontainer_name: ca.org4.example.com networks:- byfnca.org5.example.com:image: hyperledger/fabric-ca:latestenvironment:- FABRIC_CA_HOME=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/ca- FABRIC_CA_SERVER_CA_NAME=ca.org5.example.com- FABRIC_CA_SERVER_TLS_ENABLED=true- FABRIC_CA_SERVER_TLS_CERTFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/ca/ca.org5.example.com-cert.pem- FABRIC_CA_SERVER_TLS_KEYFILE=/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/ca/65b0378e702d62bc6886ecdee32f8813f65baaea64cdd3a78556d854978f85c8_sk- FABRIC_CA_SERVER_PORT=11054ports:- "11054:11054"command: sh -c 'fabric-ca-server start --ca.certfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/ca/ca.org5.example.com-cert.pem --ca.keyfile /opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/ca/65b0378e702d62bc6886ecdee32f8813f65baaea64cdd3a78556d854978f85c8_sk -b admin:adminpw -d'volumes:- ./crypto-config/peerOrganizations/org5.example.com/ca/:/opt/gopath/src/github.com/hyperledger/fabric/scripts/fabric-samples/first-network/crypto-config/peerOrganizations/org5.example.com/cacontainer_name: ca.org5.example.comnetworks:- byfn
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
