2016-04-28 09:59:57 +08:00
|
|
|
# This compose file will start a cluster with 4 hyperledger peer nodes
|
2016-04-15 16:45:57 +08:00
|
|
|
# vp0: validating node as root
|
|
|
|
# vp1: validating node as peer
|
|
|
|
# vp2: validating node as peer
|
|
|
|
# vp3: validating node as peer
|
|
|
|
# https://github.com/yeasy/docker-compose-files
|
|
|
|
|
|
|
|
# validating node as the root
|
|
|
|
vp0:
|
|
|
|
extends:
|
|
|
|
file: compose-defaults.yml
|
|
|
|
service: vp
|
|
|
|
hostname: vp0
|
|
|
|
environment:
|
|
|
|
- CORE_PEER_ID=vp0
|
|
|
|
|
2016-04-28 09:59:57 +08:00
|
|
|
# validating node
|
2016-04-15 16:45:57 +08:00
|
|
|
vp1:
|
|
|
|
extends:
|
2016-04-20 14:58:38 +08:00
|
|
|
file: compose-defaults.yml
|
|
|
|
service: vp
|
2016-04-15 16:45:57 +08:00
|
|
|
hostname: vp1
|
|
|
|
environment:
|
|
|
|
- CORE_PEER_ID=vp1
|
|
|
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
|
|
|
links:
|
|
|
|
- vp0
|
|
|
|
|
2016-04-28 09:59:57 +08:00
|
|
|
# validating node
|
2016-04-15 16:45:57 +08:00
|
|
|
vp2:
|
|
|
|
extends:
|
2016-04-20 14:58:38 +08:00
|
|
|
file: compose-defaults.yml
|
|
|
|
service: vp
|
2016-04-15 16:45:57 +08:00
|
|
|
hostname: vp2
|
|
|
|
environment:
|
|
|
|
- CORE_PEER_ID=vp2
|
|
|
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
|
|
|
links:
|
|
|
|
- vp0
|
|
|
|
|
2016-04-20 14:58:38 +08:00
|
|
|
|
2016-04-28 09:59:57 +08:00
|
|
|
# validating node
|
|
|
|
# vp3 will also be used for client interactive operations
|
2016-04-20 14:58:38 +08:00
|
|
|
# If you want to run fabric command on the host, then map 30303:30303 to host
|
|
|
|
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:30303` to specify peer addr.
|
|
|
|
vp3:
|
2016-04-15 16:45:57 +08:00
|
|
|
extends:
|
2016-04-20 14:58:38 +08:00
|
|
|
file: compose-defaults.yml
|
|
|
|
service: vp
|
2016-04-15 16:45:57 +08:00
|
|
|
hostname: vp3
|
|
|
|
environment:
|
|
|
|
- CORE_PEER_ID=vp3
|
|
|
|
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
|
|
|
|
links:
|
|
|
|
- vp0
|
2016-04-20 14:58:38 +08:00
|
|
|
ports:
|
|
|
|
- "5000:5000"
|
|
|
|
#- "30303:30303"
|