docker-compose-files/hyperledger_fabric/v1.0.0/artifacts_generation/docker-compose-2orgs.yml

95 lines
3.4 KiB
YAML
Raw Normal View History

2017-05-18 17:12:14 +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
# * 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:
2017-05-31 14:20:24 +08:00
- "7054:7054"
2017-05-18 17:12:14 +08:00
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
2017-05-31 14:20:24 +08:00
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
2017-05-18 17:12:14 +08:00
- 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:
2017-11-26 18:32:56 +08:00
#- ./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
2017-05-18 17:12:14 +08:00
- ./example2:/opt/gopath/src/github.com/hyperledger/fabric/peer/example2
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
2017-11-26 18:32:56 +08:00
- ./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
2017-05-18 17:12:14 +08:00
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