2018-10-11 13:53:01 +08:00
|
|
|
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
|
|
|
|
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
|
|
|
|
# * 2 ca (not in use now)
|
|
|
|
# * 1 orderer
|
|
|
|
# * 4 peers in 2 orgs
|
|
|
|
# * cli for testing
|
|
|
|
|
|
|
|
version: '2.0'
|
|
|
|
|
|
|
|
services:
|
|
|
|
# ca.org1.example.com:
|
|
|
|
# extends:
|
|
|
|
# file: base-kafka.yaml
|
|
|
|
# service: ca.org1.example.com
|
|
|
|
|
|
|
|
# ca.org2.example.com:
|
|
|
|
# extends:
|
|
|
|
# file: base-kafka.yaml
|
|
|
|
# service: ca.org2.example.com
|
|
|
|
|
|
|
|
cli:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: cli
|
|
|
|
|
2018-10-12 11:33:24 +08:00
|
|
|
orderer0.example.com: # There can be multiple orderers
|
2018-10-11 13:53:01 +08:00
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
2018-10-12 11:33:24 +08:00
|
|
|
service: orderer0.example.com
|
2018-10-11 13:53:01 +08:00
|
|
|
depends_on:
|
|
|
|
- kafka0
|
|
|
|
- kafka1
|
|
|
|
- kafka2
|
|
|
|
- kafka3
|
|
|
|
|
2018-10-12 11:33:24 +08:00
|
|
|
orderer1.example.com: # There can be multiple orderers
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: orderer1.example.com
|
|
|
|
depends_on:
|
|
|
|
- kafka0
|
|
|
|
- kafka1
|
|
|
|
- kafka2
|
|
|
|
- kafka3
|
|
|
|
|
2018-10-11 13:53:01 +08:00
|
|
|
peer0.org1.example.com:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: peer0.org1.example.com
|
|
|
|
depends_on:
|
2018-10-12 11:33:24 +08:00
|
|
|
- orderer0.example.com
|
|
|
|
- orderer1.example.com
|
2018-10-11 13:53:01 +08:00
|
|
|
|
|
|
|
peer1.org1.example.com:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: peer1.org1.example.com
|
2018-10-12 11:33:24 +08:00
|
|
|
depends_on:
|
|
|
|
- orderer0.example.com
|
|
|
|
- orderer1.example.com
|
2018-10-11 13:53:01 +08:00
|
|
|
|
|
|
|
peer0.org2.example.com:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: peer0.org2.example.com
|
2018-10-12 11:33:24 +08:00
|
|
|
depends_on:
|
|
|
|
- orderer0.example.com
|
|
|
|
- orderer1.example.com
|
2018-10-11 13:53:01 +08:00
|
|
|
|
|
|
|
peer1.org2.example.com:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: peer1.org2.example.com
|
2018-10-12 11:33:24 +08:00
|
|
|
depends_on:
|
|
|
|
- orderer0.example.com
|
|
|
|
- orderer1.example.com
|
2018-10-11 13:53:01 +08:00
|
|
|
|
|
|
|
# ZooKeeper services, at least 3 nodes
|
|
|
|
zookeeper0:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: zookeeper0
|
|
|
|
|
|
|
|
zookeeper1:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: zookeeper1
|
|
|
|
|
|
|
|
zookeeper2:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: zookeeper2
|
|
|
|
|
|
|
|
# Kafka services, at least 4 node to tolerant work with 1 node failure
|
|
|
|
kafka0:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: kafka0
|
|
|
|
depends_on:
|
|
|
|
- zookeeper0
|
|
|
|
- zookeeper1
|
|
|
|
- zookeeper2
|
|
|
|
|
|
|
|
kafka1:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: kafka1
|
|
|
|
depends_on:
|
|
|
|
- zookeeper0
|
|
|
|
- zookeeper1
|
|
|
|
- zookeeper2
|
|
|
|
|
|
|
|
kafka2:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: kafka2
|
|
|
|
depends_on:
|
|
|
|
- zookeeper0
|
|
|
|
- zookeeper1
|
|
|
|
- zookeeper2
|
|
|
|
|
|
|
|
kafka3:
|
|
|
|
extends:
|
|
|
|
file: base-kafka.yaml
|
|
|
|
service: kafka3
|
|
|
|
depends_on:
|
|
|
|
- zookeeper0
|
|
|
|
- zookeeper1
|
|
|
|
- zookeeper2
|
|
|
|
|
|
|
|
#networks:
|
|
|
|
# default:
|
|
|
|
# external:
|
|
|
|
# name: hyperledger_fabric
|