95 lines
3.4 KiB
YAML
95 lines
3.4 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
|
|
|
|
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
|
|
|
|
orderer.example.com: # There can be multiple orderers
|
|
container_name: orderer.example.com
|
|
extends:
|
|
file: peer-base.yml
|
|
service: orderer.example.com
|
|
|
|
peer0.org1.example.com:
|
|
extends:
|
|
file: peer-base.yml
|
|
service: peer0.org1.example.com
|
|
container_name: peer0.org1.example.com
|
|
|
|
peer1.org1.example.com:
|
|
extends:
|
|
file: peer-base.yml
|
|
service: peer1.org1.example.com
|
|
container_name: peer1.org1.example.com
|
|
|
|
peer0.org2.example.com:
|
|
extends:
|
|
file: peer-base.yml
|
|
service: peer0.org2.example.com
|
|
container_name: peer0.org2.example.com
|
|
|
|
peer1.org2.example.com:
|
|
extends:
|
|
file: peer-base.yml
|
|
service: peer1.org2.example.com
|
|
container_name: peer1.org2.example.com
|
|
|
|
peer0.org3.example.com:
|
|
extends:
|
|
file: peer-base.yml
|
|
service: peer0.org3.example.com
|
|
container_name: peer0.org3.example.com
|
|
|
|
cli:
|
|
extends:
|
|
file: peer.yml
|
|
service: peer
|
|
container_name: fabric-cli
|
|
hostname: cli
|
|
environment:
|
|
- CORE_PEER_ID=cli
|
|
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
|
|
- CORE_PEER_LOCALMSPID=Org1MSP
|
|
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
|
|
- CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true
|
|
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
|
|
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
|
|
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
|
|
links:
|
|
- peer0.org1.example.com
|
|
- orderer.example.com
|
|
volumes:
|
|
#- ./solo/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
|
|
- ./solo/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
|
|
- ./solo/crypto-config:/etc/hyperledger/fabric/crypto-config
|
|
- ./example2:/opt/gopath/src/github.com/hyperledger/fabric/peer/example2
|
|
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
|
- ./solo/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
|
|
- ./solo/configtx.yaml:/opt/gopath/src/github.com/hyperledger/fabric/peer/configtx.yaml
|
|
- ./solo/crypto-config.yaml:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto-config.yaml
|
|
depends_on:
|
|
- orderer.example.com
|
|
- peer0.org1.example.com
|
|
- peer1.org1.example.com
|
|
- peer0.org2.example.com
|
|
- peer1.org2.example.com
|
|
command: bash -c 'while true; do sleep 20170504; done'
|
|
|
|
#networks:
|
|
# default:
|
|
# external:
|
|
# name: hyperledger_fabric
|