mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
The pattern of the byfn scripts and of our tutorial is to start the CLI container, then docker exec commands against it. For some reason, we only start the CLI container with a command of 'sleep 1000' which causes it exit after this time. This causes headaches of having to restart the CLI container and is only saving the overhead of one idle bash process. From a usability it seems far better to leave an idle bash process so that we can be assured the container is still running. Change-Id: I8d5c860b89226a28f15d42f5a19e42b923bfa8c1 Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
85 lines
2.7 KiB
YAML
85 lines
2.7 KiB
YAML
# Copyright IBM Corp. All Rights Reserved.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
version: '2'
|
|
|
|
networks:
|
|
byfn:
|
|
|
|
services:
|
|
|
|
orderer.example.com:
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: orderer.example.com
|
|
container_name: orderer.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer0.org1.example.com:
|
|
container_name: peer0.org1.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer0.org1.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer1.org1.example.com:
|
|
container_name: peer1.org1.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer1.org1.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer0.org2.example.com:
|
|
container_name: peer0.org2.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer0.org2.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
peer1.org2.example.com:
|
|
container_name: peer1.org2.example.com
|
|
extends:
|
|
file: base/docker-compose-base.yaml
|
|
service: peer1.org2.example.com
|
|
networks:
|
|
- byfn
|
|
|
|
cli:
|
|
container_name: cli
|
|
image: hyperledger/fabric-tools:$IMAGE_TAG
|
|
tty: true
|
|
stdin_open: 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=peer0.org1.example.com:7051
|
|
- CORE_PEER_LOCALMSPID=Org1MSP
|
|
- CORE_PEER_TLS_ENABLED=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
|
|
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
|
|
command: /bin/bash
|
|
volumes:
|
|
- /var/run/:/host/var/run/
|
|
- ./../chaincode/:/opt/gopath/src/github.com/chaincode
|
|
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
|
|
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
|
|
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
|
|
depends_on:
|
|
- orderer.example.com
|
|
- peer0.org1.example.com
|
|
- peer1.org1.example.com
|
|
- peer0.org2.example.com
|
|
- peer1.org2.example.com
|
|
networks:
|
|
- byfn
|