docker-compose-files/hyperledger_fabric/v1.0.0/docker-compose-dev.yaml

85 lines
3.4 KiB
YAML
Raw Normal View History

2017-05-04 22:15:51 +08:00
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
# * 1 ca
# * 1 orderer
# * 1 peer
# * cli for testing
2017-05-04 22:15:51 +08:00
version: '2.0'
services:
2017-09-01 20:18:46 +08:00
ca.example.com: # not used currently
extends:
file: base.yaml
service: ca-base
container_name: ca.example.com
hostname: ca.example.com
2017-05-04 22:15:51 +08:00
# command: /go/src/github.com/hyperledger/fabric-ca/bin/ca server start -ca testdata/ec.pem -ca-key testdata/ec-key.pem -config testdata/testconfig.json
ports:
2017-05-13 10:39:13 +08:00
- "7054:7054"
2017-05-04 22:15:51 +08:00
command: fabric-ca-server start -b admin:adminpw
orderer.example.com: # There can be multiple orderers
2017-05-04 22:15:51 +08:00
extends:
2017-09-01 20:18:46 +08:00
file: base.yaml
service: orderer-base
container_name: orderer.example.com
hostname: orderer.example.com
2017-05-04 22:15:51 +08:00
ports:
- "7050:7050"
volumes:
2017-11-26 18:32:56 +08:00
- ./solo/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ./solo/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ./solo/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
command: orderer start
2017-05-04 22:15:51 +08:00
cli:
#extends:
# file: peer-docker-compose-base-dev.yaml
# service: peer-base
2017-09-01 20:18:46 +08:00
#image: yeasy/hyperledger-fabric:1.0.1
extends:
file: base.yaml
service: cli-base
2017-05-04 22:15:51 +08:00
container_name: fabric-cli
hostname: fabric-cli
tty: true
2017-05-04 22:15:51 +08:00
environment:
- CORE_PEER_ID=fabric-cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
- CORE_PEER_LOCALMSPID=Org1MSP
- 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_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
2017-05-04 22:15:51 +08:00
volumes:
2017-08-31 15:59:37 +08:00
- $GOPATH/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric
- /tmp/:/tmp/
peer0.org1.example.com:
extends:
2017-09-01 20:18:46 +08:00
file: base.yaml
service: peer-base-dev
container_name: peer0.org1.example.com
hostname: peer0.org1.example.com
environment:
- CORE_PEER_ID=peer0.org1.example.com
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
volumes:
2017-11-26 18:32:56 +08:00
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
- ./solo/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
ports:
- 7051:7051
- 7052:7052
- 7053:7053
2017-08-31 15:59:37 +08:00
command: bash -c 'bash /tmp/peer_build.sh; peer node start'
#command: peer node start
2017-05-04 22:15:51 +08:00
#networks:
# default:
# external:
# name: hyperledger_fabric