docker-compose-files/hyperledger/1.0/docker-compose.yaml

78 lines
1.9 KiB
YAML
Raw Normal View History

2017-01-04 14:54:05 +08:00
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * ca
2017-01-04 14:54:05 +08:00
# * orderer
# * peer
# * sdk for testing
2017-04-06 17:50:34 +08:00
# all peers will join the default testchainid channel after bootup
2017-01-04 14:54:05 +08:00
version: '2.0'
services:
ca:
image: hyperledger/fabric-ca
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
2017-01-04 14:54:05 +08:00
ports:
2017-05-28 10:05:11 +08:00
- "7054:7054"
2017-04-18 15:26:06 +08:00
command: fabric-ca-server start -b admin:adminpw
2017-01-04 14:54:05 +08:00
2017-04-06 17:50:34 +08:00
orderer0: # There can be multiple orderers
2017-01-04 14:54:05 +08:00
image: hyperledger/fabric-orderer
2017-04-06 17:50:34 +08:00
container_name: fabric-orderer0
hostname: orderer0
2017-01-04 14:54:05 +08:00
environment:
2017-06-07 15:53:15 +08:00
- ORDERER_GENERAL_LEDGERTYPE=file
2017-01-04 14:54:05 +08:00
- ORDERER_GENERAL_BATCHTIMEOUT=10s
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
2017-02-08 15:45:46 +08:00
- ORDERER_GENERAL_LISTENPORT=7050
2017-01-04 14:54:05 +08:00
- ORDERER_RAMLEDGER_HISTORY_SIZE=100
2017-02-27 08:56:30 +08:00
- CONFIGTX_ORDERER_ORDERERTYPE=solo
2017-01-04 14:54:05 +08:00
ports:
- "7050:7050"
command: orderer
2017-02-08 15:45:46 +08:00
peer0:
2017-01-04 14:54:05 +08:00
extends:
file: peer.yml
service: peer
2017-02-08 15:45:46 +08:00
container_name: fabric-peer0
hostname: peer0
2017-01-04 14:54:05 +08:00
environment:
2017-02-08 15:45:46 +08:00
- CORE_PEER_ID=peer0
2017-04-06 17:50:34 +08:00
- CORE_PEER_GOSSIP_ORGLEADER=true
2017-01-04 14:54:05 +08:00
links:
2017-04-06 17:50:34 +08:00
- orderer0
2017-01-04 14:54:05 +08:00
ports:
- 7051:7051
depends_on:
2017-04-06 17:50:34 +08:00
- orderer0
command: peer node start -o orderer0:7050
2017-04-06 17:50:34 +08:00
cli:
extends:
file: peer.yml
service: peer
container_name: fabric-cli
hostname: cli
environment:
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0:7051
#- CORE_PEER_LOCALMSPID=Org0MSP
links:
- peer0
- orderer0
depends_on:
- peer0
- orderer0
2017-05-04 22:15:51 +08:00
command: bash -c 'while true; do sleep 20170504; done'
2017-01-04 14:54:05 +08:00
#networks:
# default:
# external:
# name: hyperledger_fabric