2017-10-05 23:21:54 +08:00
|
|
|
# This is the default base file to config env and command
|
2017-11-01 22:17:36 +08:00
|
|
|
# All element in this file is abstract without knowing the org and consensus type
|
2017-09-26 22:20:31 +08:00
|
|
|
# https://github.com/yeasy/docker-compose-files
|
|
|
|
|
2017-10-05 23:21:54 +08:00
|
|
|
# Depends on the hyperledger/fabric-peer image.
|
2017-09-26 22:20:31 +08:00
|
|
|
|
|
|
|
version: '2'
|
|
|
|
|
|
|
|
services:
|
2017-10-05 23:21:54 +08:00
|
|
|
ca-base:
|
|
|
|
#image: yeasy/hyperledger-fabric-ca:1.0.3
|
|
|
|
image: hyperledger/fabric-ca:x86_64-1.0.3
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
|
|
|
|
- FABRIC_CA_SERVER_TLS_ENABLED=true
|
2017-10-28 14:41:13 +08:00
|
|
|
#- FABRIC_CA_SERVER_TLS_ENABLED=false
|
2017-10-05 23:21:54 +08:00
|
|
|
|
|
|
|
orderer-base:
|
|
|
|
#image: yeasy/hyperledger-fabric-orderer:1.0.3
|
|
|
|
image: hyperledger/fabric-orderer:x86_64-1.0.3
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- ORDERER_GENERAL_LOGLEVEL=DEBUG
|
|
|
|
- ORDERER_GENERAL_LOGFORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
|
|
|
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
|
|
|
|
- ORDERER_GENERAL_GENESISMETHOD=file
|
|
|
|
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
|
|
|
|
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
|
|
|
|
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
|
|
|
|
- ORDERER_GENERAL_LEDGERTYPE=file
|
|
|
|
- ORDERER_GENERAL_BATCHTIMEOUT=2s
|
|
|
|
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
|
|
|
|
- ORDERER_GENERAL_MAXWINDOWSIZE=1000
|
|
|
|
- ORDERER_GENERAL_LISTENPORT=7050
|
|
|
|
#- ORDERER_RAMLEDGER_HISTORY_SIZE=100 #only useful when use ram ledger
|
|
|
|
# enabled TLS
|
2017-10-28 14:41:13 +08:00
|
|
|
#- ORDERER_GENERAL_TLS_ENABLED=true
|
2017-10-05 23:21:54 +08:00
|
|
|
- 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]
|
|
|
|
expose:
|
|
|
|
- "7050" #
|
|
|
|
command: orderer start
|
|
|
|
|
2017-09-27 16:04:27 +08:00
|
|
|
peer-base:
|
2017-10-05 23:21:54 +08:00
|
|
|
image: yeasy/hyperledger-fabric-peer:1.0.3
|
|
|
|
#image: hyperledger/fabric-peer:x86_64-1.0.3
|
2017-09-26 22:20:31 +08:00
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- CORE_PEER_ADDRESSAUTODETECT=false
|
|
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
|
|
|
- CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
2017-10-06 20:02:21 +08:00
|
|
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=latest_default # uncomment this to use specific network
|
2017-09-26 22:20:31 +08:00
|
|
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
|
|
|
- CORE_PEER_GOSSIP_ORGLEADER=false # this node is the group leader, default to false
|
|
|
|
- CORE_PEER_PROFILE_ENABLED=false
|
2017-10-28 14:41:13 +08:00
|
|
|
#- CORE_PEER_TLS_ENABLED=true
|
2017-09-26 22:20:31 +08:00
|
|
|
- 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
|
|
|
|
- CORE_CHIANCODE_LOGGING_LEVEL=DEBUG
|
|
|
|
- CORE_CHIANCODE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
|
|
|
expose:
|
|
|
|
- "7050" # Rest
|
|
|
|
- "7051" # Grpc
|
|
|
|
- "7052" # Peer CLI
|
|
|
|
- "7053" # Peer Event
|
|
|
|
- "7054" # eCAP
|
|
|
|
- "7055" # eCAA
|
|
|
|
- "7056" # tCAP
|
|
|
|
- "7057" # eCAA
|
|
|
|
- "7058" # tlsCAP
|
|
|
|
- "7059" # tlsCAA
|
|
|
|
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2017-10-05 23:21:54 +08:00
|
|
|
#volumes:
|
|
|
|
# - /var/run/:/host/var/run/
|
|
|
|
command: peer node start
|
2017-09-26 22:20:31 +08:00
|
|
|
|
2017-09-27 16:04:27 +08:00
|
|
|
cli-base:
|
2017-10-05 23:21:54 +08:00
|
|
|
#image: yeasy/hyperledger-fabric:1.0.3
|
|
|
|
image: hyperledger/fabric-tools:x86_64-1.0.3
|
2017-09-26 22:20:31 +08:00
|
|
|
restart: always
|
|
|
|
tty: true
|
|
|
|
environment:
|
|
|
|
#- GOPATH=/opt/gopath
|
|
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
2017-10-05 23:21:54 +08:00
|
|
|
- CORE_LOGGING_FORMAT=%{color}[%{id:03x} %{time:01-02 15:04:05.00 MST}] [%{longpkg}] %{callpath} -> %{level:.4s}%{color:reset} %{message}
|
2017-10-28 14:41:13 +08:00
|
|
|
#- CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true
|
2017-09-26 22:20:31 +08:00
|
|
|
- ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
|
|
|
|
- CHANNEL_NAME:="businesschannel"
|
|
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
2017-10-28 14:41:13 +08:00
|
|
|
command: bash -c 'cd /tmp; source scripts/func.sh; while true; do sleep 20170504; done'
|
2017-10-05 23:21:54 +08:00
|
|
|
|
|
|
|
couchdb-base:
|
|
|
|
#container_name: couchdb0
|
|
|
|
image: hyperledger/fabric-couchdb:x86_64-1.0.3
|
|
|
|
restart: always
|
|
|
|
tty: true
|
|
|
|
# Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
|
|
|
|
# for example map it to utilize Fauxton User Interface in dev environments.
|
|
|
|
|
|
|
|
zookeeper-base:
|
|
|
|
# TODO: provide a validated image
|
|
|
|
image: hyperledger/fabric-zookeeper:x86_64-1.0.3
|
|
|
|
restart: always
|
|
|
|
tty: true
|
|
|
|
expose:
|
|
|
|
- '2181'
|
|
|
|
- '2888'
|
|
|
|
- '3888'
|
|
|
|
|
|
|
|
kafka-base:
|
|
|
|
# official repo doesn't have latest tag, however, kafka changes version recently
|
|
|
|
image: yeasy/hyperledger-fabric-kafka:0.10.2.0
|
|
|
|
#image: hyperledger/fabric-kafka:x86_64-1.1.0-snapshot-8c934cd4
|
|
|
|
#image: hyperledger/fabric-kafka:x86_64-1.0.3
|
|
|
|
restart: always
|
|
|
|
tty: true
|
|
|
|
environment:
|
|
|
|
- KAFKA_MESSAGE_MAX_BYTES=1048576 # 1 * 1024 * 1024 B
|
|
|
|
- KAFKA_REPLICA_FETCH_MAX_BYTES=1048576 # 1 * 1024 * 1024 B
|
|
|
|
- KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE=false
|
|
|
|
- KAFKA_LOG_RETENTION_MS=-1
|
|
|
|
expose:
|
|
|
|
- '9092'
|