123 lines
4.8 KiB
YAML
123 lines
4.8 KiB
YAML
|
# This is the default base file to config env and command
|
||
|
# Notice that chaincode is executed inside docker in default net mode
|
||
|
# https://github.com/yeasy/docker-compose-files
|
||
|
|
||
|
# Depends on the hyperledger/fabric-peer image.
|
||
|
|
||
|
version: '2'
|
||
|
|
||
|
services:
|
||
|
ca-base:
|
||
|
#image: yeasy/hyperledger-fabric-ca:1.0.2
|
||
|
image: hyperledger/fabric-ca:x86_64-1.0.2
|
||
|
restart: always
|
||
|
environment:
|
||
|
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
|
||
|
- FABRIC_CA_SERVER_TLS_ENABLED=true
|
||
|
|
||
|
orderer-base:
|
||
|
#image: yeasy/hyperledger-fabric-orderer:1.0.2
|
||
|
image: hyperledger/fabric-orderer:x86_64-1.0.2
|
||
|
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
|
||
|
- ORDERER_GENERAL_TLS_ENABLED=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]
|
||
|
expose:
|
||
|
- "7050" #
|
||
|
command: orderer start
|
||
|
|
||
|
peer-base:
|
||
|
image: yeasy/hyperledger-fabric-peer:1.0.2
|
||
|
#image: hyperledger/fabric-peer:x86_64-1.0.2
|
||
|
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}
|
||
|
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=v102_default # uncomment this to use specific network
|
||
|
- CORE_PEER_GOSSIP_USELEADERELECTION=true
|
||
|
- CORE_PEER_GOSSIP_ORGLEADER=false # this node is the group leader, default to false
|
||
|
- CORE_PEER_PROFILE_ENABLED=false
|
||
|
- CORE_PEER_TLS_ENABLED=true
|
||
|
- 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
|
||
|
#volumes:
|
||
|
# - /var/run/:/host/var/run/
|
||
|
command: peer node start
|
||
|
|
||
|
cli-base:
|
||
|
#image: yeasy/hyperledger-fabric:1.0.2
|
||
|
image: hyperledger/fabric-tools:x86_64-1.0.2
|
||
|
restart: always
|
||
|
tty: true
|
||
|
environment:
|
||
|
#- GOPATH=/opt/gopath
|
||
|
- 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}
|
||
|
- CORE_PEER_TLS_ENABLED=true # to enable TLS, change to true
|
||
|
- 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
|
||
|
command: bash -c 'cd /tmp; bash scripts/func.sh; while true; do sleep 20170504; done'
|
||
|
|
||
|
couchdb-base:
|
||
|
#container_name: couchdb0
|
||
|
image: hyperledger/fabric-couchdb:x86_64-1.0.2
|
||
|
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:
|
||
|
image: hyperledger/fabric-zookeeper:x86_64-1.0.2
|
||
|
restart: always
|
||
|
tty: true
|
||
|
expose:
|
||
|
- '2181'
|
||
|
- '2888'
|
||
|
- '3888'
|
||
|
|
||
|
kafka-base:
|
||
|
image: hyperledger/fabric-kafka:x86_64-1.0.2
|
||
|
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'
|