mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update both BYFN and EYFN so that the peer request and chaincode ports match the externally mapped ports. This enables applications both inside and outside the Docker network to use service discovery to interact with these networks (see the JIRA for more details). Change-Id: I73c36dfdb269ec4225376fb04b1e7a087363e4cc Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
124 lines
5.2 KiB
YAML
124 lines
5.2 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '2'
|
|
|
|
services:
|
|
|
|
orderer.example.com:
|
|
container_name: orderer.example.com
|
|
image: hyperledger/fabric-orderer:$IMAGE_TAG
|
|
environment:
|
|
- FABRIC_LOGGING_SPEC=INFO
|
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
|
- ORDERER_GENERAL_GENESISMETHOD=file
|
|
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
|
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
|
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
|
|
# enabled TLS
|
|
- ORDERER_GENERAL_TLS_ENABLED=true
|
|
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
|
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
|
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
|
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
|
|
- ORDERER_KAFKA_VERBOSE=true
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
|
command: orderer
|
|
volumes:
|
|
- ../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/orderer
|
|
ports:
|
|
- 7050:7050
|
|
|
|
peer0.org1.example.com:
|
|
container_name: peer0.org1.example.com
|
|
extends:
|
|
file: peer-base.yaml
|
|
service: peer-base
|
|
environment:
|
|
- 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
|
|
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/production
|
|
ports:
|
|
- 7051:7051
|
|
|
|
peer1.org1.example.com:
|
|
container_name: peer1.org1.example.com
|
|
extends:
|
|
file: peer-base.yaml
|
|
service: peer-base
|
|
environment:
|
|
- 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
|
|
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/production
|
|
|
|
ports:
|
|
- 8051:8051
|
|
|
|
peer0.org2.example.com:
|
|
container_name: peer0.org2.example.com
|
|
extends:
|
|
file: peer-base.yaml
|
|
service: peer-base
|
|
environment:
|
|
- 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
|
|
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/production
|
|
ports:
|
|
- 9051:9051
|
|
|
|
peer1.org2.example.com:
|
|
container_name: peer1.org2.example.com
|
|
extends:
|
|
file: peer-base.yaml
|
|
service: peer-base
|
|
environment:
|
|
- 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
|
|
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/production
|
|
ports:
|
|
- 10051:10051
|