mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Adds a docker environment for running peer in dev mode pre-baked crypto and orderer/channel artifacts README still needs an updated curl command to bundle these scripts. simplified some of the paths add sacc from write your first chaincode remove binary Change-Id: Ic1537987c819f0350ae6dbf740fd00e1571045e5 Signed-off-by: Nick Gaski <ngaski@us.ibm.com> Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
87 lines
2.6 KiB
YAML
87 lines
2.6 KiB
YAML
version: '2'
|
|
|
|
services:
|
|
orderer:
|
|
container_name: orderer
|
|
image: hyperledger/fabric-orderer
|
|
environment:
|
|
- ORDERER_GENERAL_LOGLEVEL=debug
|
|
- ORDERER_GENERAL_LISTENADDRESS=orderer
|
|
- ORDERER_GENERAL_GENESISMETHOD=file
|
|
- ORDERER_GENERAL_GENESISFILE=orderer.block
|
|
- ORDERER_GENERAL_LOCALMSPID=DEFAULT
|
|
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp
|
|
- GRPC_TRACE=all=true,
|
|
- GRPC_VERBOSITY=debug
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
|
|
command: orderer
|
|
volumes:
|
|
- ./msp:/etc/hyperledger/msp
|
|
- ./orderer.block:/etc/hyperledger/fabric/orderer.block
|
|
ports:
|
|
- 7050:7050
|
|
peer:
|
|
container_name: peer
|
|
image: hyperledger/fabric-peer
|
|
environment:
|
|
- CORE_PEER_ID=peer
|
|
- CORE_PEER_ADDRESS=peer:7051
|
|
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer:7051
|
|
- CORE_PEER_LOCALMSPID=DEFAULT
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
|
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp
|
|
volumes:
|
|
- /var/run/:/host/var/run/
|
|
- ./msp:/etc/hyperledger/msp
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
|
command: peer node start --peer-chaincodedev=true -o orderer:7050
|
|
ports:
|
|
- 7051:7051
|
|
- 7053:7053
|
|
depends_on:
|
|
- orderer
|
|
|
|
cli:
|
|
container_name: cli
|
|
image: hyperledger/fabric-tools
|
|
tty: true
|
|
environment:
|
|
- GOPATH=/opt/gopath
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
|
- CORE_PEER_ID=cli
|
|
- CORE_PEER_ADDRESS=peer:7051
|
|
- CORE_PEER_LOCALMSPID=DEFAULT
|
|
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp
|
|
working_dir: /opt/gopath/src/chaincodedev
|
|
command: /bin/bash -c './script.sh'
|
|
volumes:
|
|
- /var/run/:/host/var/run/
|
|
- ./msp:/etc/hyperledger/msp
|
|
- ./:/opt/gopath/src/chaincodedev
|
|
depends_on:
|
|
- orderer
|
|
- peer
|
|
|
|
chaincode:
|
|
container_name: chaincode
|
|
image: hyperledger/fabric-ccenv
|
|
tty: true
|
|
environment:
|
|
- GOPATH=/opt/gopath
|
|
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
|
|
- CORE_LOGGING_LEVEL=DEBUG
|
|
- CORE_PEER_ID=example02
|
|
- CORE_PEER_ADDRESS=peer:7051
|
|
- CORE_PEER_LOCALMSPID=DEFAULT
|
|
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp
|
|
working_dir: /opt/gopath/src/chaincode
|
|
command: /bin/bash -c 'sleep 6000000'
|
|
volumes:
|
|
- /var/run/:/host/var/run/
|
|
- ./msp:/etc/hyperledger/msp
|
|
- ./chaincode:/opt/gopath/src/chaincode
|
|
depends_on:
|
|
- orderer
|
|
- peer
|