Modify docker-compose-1peer.yaml

pull/63/head
qiang0723 2017-06-16 15:56:25 +08:00
parent 760bf4c0a8
commit 604e02174b
1 changed files with 23 additions and 68 deletions

View File

@ -1,9 +1,9 @@
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger # https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including # This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * ca # * 1 ca
# * orderer # * 1 orderer
# * peer # * 1 peers in 1 orgs
# * sdk for testing # * cli for testing
version: '2.0' version: '2.0'
@ -18,92 +18,47 @@ services:
command: fabric-ca-server start -b admin:adminpw command: fabric-ca-server start -b admin:adminpw
orderer.example.com: # There can be multiple orderers orderer.example.com: # There can be multiple orderers
image: hyperledger/fabric-orderer extends:
container_name: orderer.example.com file: docker-compose-base.yaml
hostname: orderer.example.com service: orderer.example.com
environment: environment:
- ORDERER_GENERAL_LOGLEVEL=INFO - ORDERER_GENERAL_TLS_ENABLED=false
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block #Need to be confirm orderer.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_LEDGERTYPE=ram
- ORDERER_GENERAL_BATCHTIMEOUT=10s
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_RAMLEDGER_HISTORY_SIZE=100
- ORDERER_GENERAL_TLS_ENABLED=false # to enable TLS, make this true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
ports:
- "7050:7050"
volumes:
- ./e2e_cli/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./e2e_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
command: orderer
peer0.org1.example.com: peer0.org1.example.com:
extends: extends:
file: peer-base.yaml file: docker-compose-base.yaml
service: peer-base service: peer0.org1.example.com
container_name: peer0.org1.example.com
hostname: peer0.org1.example.com
environment: environment:
- CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_TLS_ENABLED=false
- CORE_PEER_ADDRESS=peer0.org1:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
# - CORE_PEER_GOSSIP_ORGLEADER=true
# - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer.example.com:7050
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
links:
- orderer.example.com
ports:
- 7051:7051
- 7053:7053
volumes:
- ./e2e_cli/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ./e2e_cli/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
depends_on:
- orderer.example.com
command: peer node start --peer-defaultchain=false
cli: cli:
extends:
file: peer-base.yaml
service: peer-base
container_name: fabric-cli container_name: fabric-cli
hostname: cli hostname: fabric-cli
image: hyperledger/fabric-tools
tty: true
environment: environment:
- CORE_PEER_ID=cli - CORE_PEER_ID=fabric-cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
- CORE_PEER_LOCALMSPID=Org1MSP - CORE_PEER_LOCALMSPID=Org1MSP
#- CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050
- CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true - 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_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_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 - 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
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
links:
- peer0.org1.example.com
- orderer.example.com
volumes: volumes:
#- ./e2e_cli/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples #- ./e2e_cli/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
- ./e2e_cli/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ - ./e2e_cli/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ./e2e_cli/crypto-config:/etc/hyperledger/fabric/crypto-config
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/ - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ./e2e_cli/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts - ./e2e_cli/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
- ./e2e_cli/configtx.yaml:/opt/gopath/src/github.com/hyperledger/fabric/configtx.yaml - ./e2e_cli/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
- ./e2e_cli/crypto-config.yaml:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto-config.yaml - ./e2e_cli/crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
depends_on: depends_on:
- peer0.org1.example.com
- orderer.example.com - orderer.example.com
- peer0.org1.example.com
links:
- orderer.example.com
- peer0.org1.example.com
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: bash -c 'while true; do sleep 20170504; done' command: bash -c 'while true; do sleep 20170504; done'