Skip to content

Instantly share code, notes, and snippets.

@sharif2008
Forked from kctam/docker-compose-base.yml
Created September 23, 2019 06:19
Show Gist options
  • Save sharif2008/f5d3c2f1c0b50a2ece2d4b685b60cdb9 to your computer and use it in GitHub Desktop.
Save sharif2008/f5d3c2f1c0b50a2ece2d4b685b60cdb9 to your computer and use it in GitHub Desktop.
3node2channel setup
version: '2'
services:
orderer:
image: hyperledger/fabric-orderer
environment:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=deployment_fabric
- ORDERER_HOME=/var/hyperledger/orderer
- ORDERER_GENERAL_LOGLEVEL=debug
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_LEDGERTYPE=ram
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/configs/genesis.block
- CONFIGTX_ORDERER_ORDERERTYPE=solo
- CONFIGTX_ORDERER_BATCHSIZE_MAXMESSAGECOUNT=10
- CONFIGTX_ORDERER_BATCHTIMEOUT=2s
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
# TLS settings
- ORDERER_GENERAL_TLS_ENABLED=false
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt]
- ORDERER_TLS_CLIENTAUTHREQUIRED=false
- ORDERER_TLS_CLIENTROOTCAS_FILES=/var/hyperledger/users/[email protected]/tls/ca.crt
- ORDERER_TLS_CLIENTCERT_FILE=/var/hyperledger/users/[email protected]/tls/client.crt
- ORDERER_TLS_CLIENTKEY_FILE=/var/hyperledger/users/[email protected]/tls/client.key
volumes:
- ../channel-artifacts/:/var/hyperledger/configs
- ../crypto-config/ordererOrganizations/example.com/users:/var/hyperledger/users
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
- '7050'
peer:
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_NETWORKID=net
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=deployment_fabric
- CORE_PEER_ADDRESSAUTODETECT=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_MSPCONFIGPATH=/var/hyperledger/msp
#- CORE_LEDGER_STATE_STATEDATABASE=LevelDB
- CORE_LOGGING_LEVEL=DEBUG
- CORE_LOGGING_GOSSIP=WARNING
- CORE_LOGGING_MSP=DEBUG
# TLS settings
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_CLIENTAUTHREQUIRED=false
- CORE_PEER_TLS_CERT_FILE=/var/hyperledger/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/var/hyperledger/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/tls/ca.crt
volumes:
- /var/run/:/host/var/run/
- $GOPATH/src/github.com/hyperledger/fabric/:/opt/gopath/src/github.com/hyperledger/fabric/
- ../crypto-config/:/var/hyperledger/configs
- ../channel-artifacts/:/var/hyperledger/configs
command: peer node start
ports:
- '7051'
- '7053'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment