151 lines
6.3 KiB
YAML
151 lines
6.3 KiB
YAML
|
|
networks:
|
||
|
|
hospital_net:
|
||
|
|
name: hospital_net
|
||
|
|
ipam:
|
||
|
|
driver: default
|
||
|
|
config:
|
||
|
|
- subnet: 172.20.0.0/16
|
||
|
|
|
||
|
|
services:
|
||
|
|
orderer.hospital.com:
|
||
|
|
container_name: orderer.hospital.com
|
||
|
|
image: hyperledger/fabric-orderer:2.5
|
||
|
|
environment:
|
||
|
|
- FABRIC_LOGGING_SPEC=INFO
|
||
|
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||
|
|
- ORDERER_GENERAL_LISTENPORT=7050
|
||
|
|
- ORDERER_GENERAL_GENESISMETHOD=file
|
||
|
|
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
||
|
|
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
||
|
|
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
|
||
|
|
- 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
|
||
|
|
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
|
||
|
|
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
|
||
|
|
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
|
||
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
||
|
|
command: orderer
|
||
|
|
volumes:
|
||
|
|
- ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
|
||
|
|
- ../organizations/ordererOrganizations/hospital.com/orderers/orderer.hospital.com/msp:/var/hyperledger/orderer/msp
|
||
|
|
- ../organizations/ordererOrganizations/hospital.com/orderers/orderer.hospital.com/tls:/var/hyperledger/orderer/tls
|
||
|
|
ports:
|
||
|
|
- 7050:7050
|
||
|
|
networks:
|
||
|
|
hospital_net:
|
||
|
|
ipv4_address: 172.20.0.10
|
||
|
|
|
||
|
|
peer0.hospital.com:
|
||
|
|
container_name: peer0.hospital.com
|
||
|
|
image: hyperledger/fabric-peer:2.5
|
||
|
|
environment:
|
||
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||
|
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=hospital_net
|
||
|
|
- FABRIC_LOGGING_SPEC=INFO
|
||
|
|
- CORE_PEER_TLS_ENABLED=true
|
||
|
|
- CORE_PEER_PROFILE_ENABLED=true
|
||
|
|
- CORE_PEER_ID=peer0.hospital.com
|
||
|
|
- CORE_PEER_ADDRESS=peer0.hospital.com:7051
|
||
|
|
- CORE_PEER_LISTENADDRESS=0.0.0.0:7051
|
||
|
|
- CORE_PEER_CHAINCODEADDRESS=peer0.hospital.com:7052
|
||
|
|
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
|
||
|
|
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.hospital.com:7051
|
||
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.hospital.com:7051
|
||
|
|
- CORE_PEER_LOCALMSPID=HospitalMSP
|
||
|
|
volumes:
|
||
|
|
- /var/run/:/host/var/run/
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer0.hospital.com/msp:/etc/hyperledger/fabric/msp
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer0.hospital.com/tls:/etc/hyperledger/fabric/tls
|
||
|
|
ports:
|
||
|
|
- 7051:7051
|
||
|
|
networks:
|
||
|
|
hospital_net:
|
||
|
|
ipv4_address: 172.20.0.11
|
||
|
|
|
||
|
|
peer1.hospital.com:
|
||
|
|
container_name: peer1.hospital.com
|
||
|
|
image: hyperledger/fabric-peer:2.5
|
||
|
|
environment:
|
||
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||
|
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=hospital_net
|
||
|
|
- FABRIC_LOGGING_SPEC=INFO
|
||
|
|
- CORE_PEER_TLS_ENABLED=true
|
||
|
|
- CORE_PEER_PROFILE_ENABLED=true
|
||
|
|
- CORE_PEER_ID=peer1.hospital.com
|
||
|
|
- CORE_PEER_ADDRESS=peer1.hospital.com:8051
|
||
|
|
- CORE_PEER_LISTENADDRESS=0.0.0.0:8051
|
||
|
|
- CORE_PEER_CHAINCODEADDRESS=peer1.hospital.com:7052
|
||
|
|
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
|
||
|
|
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.hospital.com:7051 # <-- Bootstrap ke peer0
|
||
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.hospital.com:8051
|
||
|
|
- CORE_PEER_LOCALMSPID=HospitalMSP
|
||
|
|
volumes:
|
||
|
|
- /var/run/:/host/var/run/
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer1.hospital.com/msp:/etc/hyperledger/fabric/msp
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer1.hospital.com/tls:/etc/hyperledger/fabric/tls
|
||
|
|
ports:
|
||
|
|
- 8051:8051
|
||
|
|
networks:
|
||
|
|
hospital_net:
|
||
|
|
ipv4_address: 172.20.0.12
|
||
|
|
|
||
|
|
peer2.hospital.com:
|
||
|
|
container_name: peer2.hospital.com
|
||
|
|
image: hyperledger/fabric-peer:2.5
|
||
|
|
environment:
|
||
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||
|
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=hospital_net
|
||
|
|
- FABRIC_LOGGING_SPEC=INFO
|
||
|
|
- CORE_PEER_TLS_ENABLED=true
|
||
|
|
- CORE_PEER_PROFILE_ENABLED=true
|
||
|
|
- CORE_PEER_ID=peer2.hospital.com
|
||
|
|
- CORE_PEER_ADDRESS=peer2.hospital.com:9051
|
||
|
|
- CORE_PEER_LISTENADDRESS=0.0.0.0:9051
|
||
|
|
- CORE_PEER_CHAINCODEADDRESS=peer2.hospital.com:7052
|
||
|
|
- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
|
||
|
|
- CORE_PEER_GOSSIP_BOOTSTRAP=peer0.hospital.com:7051 # <-- Bootstrap ke peer0
|
||
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2.hospital.com:9051
|
||
|
|
- CORE_PEER_LOCALMSPID=HospitalMSP
|
||
|
|
volumes:
|
||
|
|
- /var/run/:/host/var/run/
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer2.hospital.com/msp:/etc/hyperledger/fabric/msp
|
||
|
|
- ../organizations/peerOrganizations/hospital.com/peers/peer2.hospital.com/tls:/etc/hyperledger/fabric/tls
|
||
|
|
ports:
|
||
|
|
- 9051:9051
|
||
|
|
networks:
|
||
|
|
hospital_net:
|
||
|
|
ipv4_address: 172.20.0.13
|
||
|
|
|
||
|
|
cli:
|
||
|
|
container_name: cli
|
||
|
|
image: hyperledger/fabric-tools:2.5
|
||
|
|
tty: true
|
||
|
|
stdin_open: true
|
||
|
|
environment:
|
||
|
|
- GOPATH=/opt/gopath
|
||
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
||
|
|
- FABRIC_LOGGING_SPEC=INFO
|
||
|
|
- CORE_PEER_TLS_ENABLED=true
|
||
|
|
- CORE_PEER_LOCALMSPID=HospitalMSP
|
||
|
|
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/hospital.com/peers/peer0.hospital.com/tls/ca.crt
|
||
|
|
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/hospital.com/users/Admin@hospital.com/msp
|
||
|
|
- CORE_PEER_ADDRESS=peer0.hospital.com:7051
|
||
|
|
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/hyperledger/fabric/peer/chaincode
|
||
|
|
- ../organizations:/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations
|
||
|
|
- ../channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
|
||
|
|
depends_on:
|
||
|
|
- orderer.hospital.com
|
||
|
|
- peer0.hospital.com
|
||
|
|
- peer1.hospital.com
|
||
|
|
- peer2.hospital.com
|
||
|
|
networks:
|
||
|
|
- hospital_net
|