80 lines
2.0 KiB
YAML
80 lines
2.0 KiB
YAML
|
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
|
||
|
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
|
||
|
# * ca
|
||
|
# * orderer
|
||
|
# * peer
|
||
|
# * sdk for testing
|
||
|
|
||
|
# all peers will join the default testchainid channel after bootup
|
||
|
|
||
|
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
|
||
|
ports:
|
||
|
- "7054:7054"
|
||
|
command: fabric-ca-server start -b admin:adminpw
|
||
|
|
||
|
orderer0: # There can be multiple orderers
|
||
|
image: hyperledger/fabric-orderer
|
||
|
container_name: fabric-orderer0
|
||
|
hostname: orderer0
|
||
|
environment:
|
||
|
- ORDERER_GENERAL_LEDGERTYPE=ram
|
||
|
- ORDERER_GENERAL_BATCHTIMEOUT=10s
|
||
|
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
|
||
|
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
|
||
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
||
|
- ORDERER_GENERAL_LISTENPORT=7050
|
||
|
- ORDERER_RAMLEDGER_HISTORY_SIZE=100
|
||
|
- CONFIGTX_ORDERER_ORDERERTYPE=solo
|
||
|
ports:
|
||
|
- "7050:7050"
|
||
|
command: orderer
|
||
|
|
||
|
peer0:
|
||
|
extends:
|
||
|
file: peer-dev.yml
|
||
|
service: peer
|
||
|
container_name: fabric-peer0
|
||
|
hostname: peer0
|
||
|
environment:
|
||
|
- CORE_PEER_ID=peer0
|
||
|
- CORE_PEER_GOSSIP_ORGLEADER=true
|
||
|
links:
|
||
|
- orderer0
|
||
|
ports:
|
||
|
- 7051:7051
|
||
|
depends_on:
|
||
|
- orderer0
|
||
|
command: peer node start -o orderer0:7050
|
||
|
|
||
|
cli:
|
||
|
extends:
|
||
|
file: peer-dev.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
|
||
|
volumes:
|
||
|
- $GOPATH/src/github.com/hyperledger/:/go/src/github.com/hyperledger/
|
||
|
depends_on:
|
||
|
- peer0
|
||
|
- orderer0
|
||
|
command: bash -c 'while true; do sleep 20170504; done'
|
||
|
|
||
|
#networks:
|
||
|
# default:
|
||
|
# external:
|
||
|
# name: hyperledger_fabric
|