docker-compose-files/hyperledger_fabric/v1.0.0/docker-compose-2orgs-4peers...

128 lines
5.6 KiB
YAML
Raw Normal View History

2017-06-09 14:15:04 +08:00
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * 1 ca
# * 1 orderer
# * 4 peers in 2 orgs
# * cli for testing
version: '2.0'
services:
ca:
2017-09-01 20:18:46 +08:00
image: yeasy/hyperledger-fabric-ca:1.0.1
2017-06-09 14:15:04 +08:00
container_name: fabric-ca
hostname: ca
# command: /go/src/github.com/hyperledger/fabric-ca/bin/ca server start -ca testdata/ec.pem -ca-key testdata/ec-key.pem -config testdata/testconfig.json
ports:
- "7054:7054"
command: fabric-ca-server start -b admin:adminpw
orderer.example.com: # There can be multiple orderers
extends:
2017-11-03 16:41:57 +08:00
file: docker-compose-base.yaml
2017-06-09 14:15:04 +08:00
service: orderer.example.com
peer0.org1.example.com:
extends:
2017-11-03 16:41:57 +08:00
file: docker-compose-base.yaml
2017-06-09 14:15:04 +08:00
service: peer0.org1.example.com
peer1.org1.example.com:
extends:
2017-11-03 16:41:57 +08:00
file: docker-compose-base.yaml
2017-06-09 14:15:04 +08:00
service: peer1.org1.example.com
peer0.org2.example.com:
extends:
2017-11-03 16:41:57 +08:00
file: docker-compose-base.yaml
2017-06-09 14:15:04 +08:00
service: peer0.org2.example.com
peer1.org2.example.com:
extends:
2017-11-03 16:41:57 +08:00
file: docker-compose-base.yaml
2017-06-09 14:15:04 +08:00
service: peer1.org2.example.com
cli:
container_name: fabric-cli
hostname: fabric-cli
2017-09-01 20:18:46 +08:00
image: yeasy/hyperledger-fabric:1.0.1
2017-06-09 14:15:04 +08:00
tty: true
environment:
- CORE_PEER_ID=fabric-cli
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
- CORE_PEER_LOCALMSPID=Org1MSP
2017-06-13 22:10:45 +08:00
- CORE_PEER_TLS_ENABLED=false # event-listener doesn't support TLS
2017-06-09 14:15:04 +08:00
- 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/msp
volumes:
2017-11-26 18:32:56 +08:00
#- ./solo/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
- ./solo/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
2017-06-09 14:15:04 +08:00
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
2017-11-26 18:32:56 +08:00
- ./solo/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
- ./solo/crypto-config:/etc/hyperledger/fabric/crypto-config
- ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
- ./solo/crypto-config.yaml:/etc/hyperledger/fabric/peer/crypto-config.yaml
2017-06-09 14:15:04 +08:00
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
links:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: bash -c 'while true; do sleep 20170504; done'
event-listener:
container_name: fabric-event-listener
hostname: fabric-event-listener
2017-09-01 20:18:46 +08:00
image: yeasy/hyperledger-fabric:1.0.1
2017-06-09 14:15:04 +08:00
tty: true
environment:
- CORE_PEER_ID=fabric-event-listener
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
- CORE_PEER_LOCALMSPID=Org1MSP
2017-06-13 22:10:45 +08:00
- CORE_PEER_TLS_ENABLED=false # event-listener doesn't support TLS
2017-06-09 14:15:04 +08:00
- 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/msp
volumes:
2017-11-26 18:32:56 +08:00
#- ./solo/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
- ./solo/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
2017-06-09 14:15:04 +08:00
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
2017-11-26 18:32:56 +08:00
- ./solo/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
- ./solo/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
- ./solo/crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
2017-06-09 14:15:04 +08:00
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
links:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: bash -c 'block-listener -events-address=peer0.org1.example.com:7053 -events-mspdir=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/ -events-mspid=Org1MSP'
#networks:
# default:
# external:
# name: hyperledger_fabric
#networks:
# default:
# external:
# name: hyperledger_fabric