docker-compose-files/hyperledger/pbft/docker-compose-with-members...

84 lines
2.1 KiB
YAML
Raw Normal View History

# This compose file will start 4 hyperledger peer nodes + 1 CA node.
# We add a delay to start the VP nodes after CA node:
2016-08-04 11:01:49 +08:00
# command: sh -c "sleep 5; peer node start"
#
2016-04-20 14:58:38 +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
membersrvc:
image: yeasy/hyperledger-membersrvc:latest
restart: unless-stopped
expose:
- "7054"
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- /var/run/docker.sock:/var/run/docker.sock
command: membersrvc # this repeats the default cmd to make sure
2016-04-20 14:58:38 +08:00
# validating node as the root
vp0:
extends:
2016-06-18 15:55:38 +08:00
file: peer-pbft.yml
2016-09-14 16:58:02 +08:00
service: vp_sec
2016-04-20 14:58:38 +08:00
hostname: vp0
environment:
- CORE_PEER_ID=vp0
- CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
2016-06-18 15:55:38 +08:00
ports:
2016-08-02 08:41:16 +08:00
- "7050:7050"
#- "7051:7051"
2016-04-20 14:58:38 +08:00
links:
- membersrvc
command: sh -c "sleep 5; peer node start"
2016-04-20 14:58:38 +08:00
vp1:
extends:
2016-06-18 15:55:38 +08:00
file: peer-pbft.yml
2016-09-14 16:58:02 +08:00
service: vp_sec
2016-04-20 14:58:38 +08:00
hostname: vp1
environment:
- CORE_PEER_ID=vp1
2016-08-02 08:41:16 +08:00
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
2016-04-20 14:58:38 +08:00
- CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links:
- membersrvc
- vp0
command: sh -c "sleep 5; peer node start"
2016-04-20 14:58:38 +08:00
vp2:
extends:
2016-06-18 15:55:38 +08:00
file: peer-pbft.yml
2016-09-14 16:58:02 +08:00
service: vp_sec
2016-04-20 14:58:38 +08:00
hostname: vp2
environment:
- CORE_PEER_ID=vp2
2016-08-02 08:41:16 +08:00
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
2016-04-20 14:58:38 +08:00
- CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
links:
- membersrvc
- vp0
command: sh -c "sleep 5; peer node start"
2016-04-20 14:58:38 +08:00
# vp3 will be used for client interactive operations
2016-08-02 08:41:16 +08:00
# If you want to run fabric command on the host, then map 7051:7051 to host
# port, or use like `CORE_PEER_ADDRESS=172.17.0.2:7051` to specify peer addr.
2016-04-20 14:58:38 +08:00
vp3:
extends:
2016-06-18 15:55:38 +08:00
file: peer-pbft.yml
2016-09-14 16:58:02 +08:00
service: vp_sec
2016-04-20 14:58:38 +08:00
hostname: vp3
environment:
- CORE_PEER_ID=vp3
2016-08-02 08:41:16 +08:00
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
2016-04-20 14:58:38 +08:00
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
links:
- membersrvc
- vp0
command: sh -c "sleep 5; peer node start"