docker-compose-files/hyperledger/1.0/docker-compose-1peer.yaml

69 lines
2.8 KiB
YAML
Raw Normal View History

2017-04-06 17:50:34 +08:00
# https://github.com/yeasy/docker-compose-files/tree/master/hyperledger
# This compose file will start a Hyperledger Fabric 1.0 MVE, including
2017-06-16 15:56:25 +08:00
# * 1 ca
# * 1 orderer
# * 1 peers in 1 orgs
# * cli for testing
2017-04-06 17:50:34 +08:00
version: '2.0'
services:
ca:
image: hyperledger/fabric-ca
container_name: fabric-ca
hostname: ca
# 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-28 10:05:11 +08:00
- "7054:7054"
2017-04-18 17:11:24 +08:00
command: fabric-ca-server start -b admin:adminpw
2017-04-06 17:50:34 +08:00
orderer.example.com: # There can be multiple orderers
2017-06-16 15:56:25 +08:00
extends:
file: docker-compose-base.yaml
service: orderer.example.com
2017-05-13 10:42:50 +08:00
environment:
2017-06-16 15:56:25 +08:00
- ORDERER_GENERAL_TLS_ENABLED=false
2017-04-06 17:50:34 +08:00
peer0.org1.example.com:
2017-04-06 17:50:34 +08:00
extends:
2017-06-16 15:56:25 +08:00
file: docker-compose-base.yaml
service: peer0.org1.example.com
2017-05-13 10:42:50 +08:00
environment:
2017-06-16 15:56:25 +08:00
- CORE_PEER_TLS_ENABLED=false
2017-04-06 17:50:34 +08:00
cli:
container_name: fabric-cli
2017-06-16 15:56:25 +08:00
hostname: fabric-cli
image: hyperledger/fabric-tools
tty: true
2017-04-06 17:50:34 +08:00
environment:
2017-06-16 15:56:25 +08:00
- CORE_PEER_ID=fabric-cli
- CORE_LOGGING_LEVEL=DEBUG
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051 # default to operate on peer0.org1
- CORE_PEER_LOCALMSPID=Org1MSP
2017-04-06 17:50:34 +08:00
- CORE_PEER_TLS_ENABLED=false # to enable TLS, change to true
- 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-04-06 17:50:34 +08:00
volumes:
2017-05-18 17:12:14 +08:00
#- ./e2e_cli/examples:/opt/gopath/src/github.com/hyperledger/fabric/examples
- ./e2e_cli/crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
2017-04-14 12:08:18 +08:00
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ./e2e_cli/channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
2017-06-16 15:56:25 +08:00
- ./e2e_cli/configtx.yaml:/etc/hyperledger/fabric/configtx.yaml
- ./e2e_cli/crypto-config.yaml:/etc/hyperledger/fabric/crypto-config.yaml
2017-04-06 17:50:34 +08:00
depends_on:
2017-06-16 15:56:25 +08:00
- orderer.example.com
2017-05-12 17:56:11 +08:00
- peer0.org1.example.com
2017-06-16 15:56:25 +08:00
links:
2017-05-13 10:42:50 +08:00
- orderer.example.com
2017-06-16 15:56:25 +08:00
- peer0.org1.example.com
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
2017-05-04 22:15:51 +08:00
command: bash -c 'while true; do sleep 20170504; done'
2017-04-06 17:50:34 +08:00
#networks:
# default:
# external:
# name: hyperledger_fabric