-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
112 lines (103 loc) · 4.92 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '2'
# ---CHANGED--- our network is called "basic"
networks:
net_basic:
services:
# ---CHANGED--- The orderer name is taken from the name generated by the "cryptogen" certs – it indicates the orderer orgs one and only orderer
orderer.my.sample:
extends:
file: base/docker-compose-base.yaml
# ---CHANGED--- refers to orderer name
service: orderer.my.sample
# ---CHANGED--- The container name is a copy of the orderer name
container_name: orderer.my.sample
networks:
- net_basic
# ---CHANGED--- The peer name is taken from the name generated by the "cryptogen" certs – it indicates the peer org 1 and one peer "peer0"
peer0.org1.my.sample:
# ---CHANGED--- Container name – same as the peer name
container_name: peer0.org1.my.sample
extends:
file: base/docker-compose-base.yaml
# ---CHANGED--- Refers to peer name
service: peer0.org1.my.sample
networks:
# ---CHANGED--- our network is called "basic"
- net_basic
# ---CHANGED--- The peer name is taken from the name generated by the "cryptogen" certs – it indicates the peer org 2 and one peer "peer0"
peer0.org2.my.sample:
# ---CHANGED--- Container name – same as the peer name
container_name: peer0.org2.my.sample
extends:
file: base/docker-compose-base.yaml
# ---CHANGED--- Refers to peer name
service: peer0.org2.my.sample
networks:
# ---CHANGED--- our network is called "basic"
- net_basic
# ---CHANGED--- The peer name is taken from the name generated by the "cryptogen" certs – it indicates the peer org 3 and one peer "peer0"
peer0.org3.my.sample:
# ---CHANGED--- Container name – same as the peer name
container_name: peer0.org3.my.sample
extends:
file: base/docker-compose-base.yaml
# ---CHANGED--- Refers to peer name
service: peer0.org3.my.sample
networks:
# ---CHANGED--- our network is called "basic"
- net_basic
# ---CHANGED--- The peer name is taken from the name generated by the "cryptogen" certs – it indicates the peer org 3 and one peer "peer0"
peer0.org4.my.sample:
# ---CHANGED--- Container name – same as the peer name
container_name: peer0.org4.my.sample
extends:
file: base/docker-compose-base.yaml
# ---CHANGED--- Refers to peer name
service: peer0.org4.my.sample
networks:
# ---CHANGED--- our network is called "basic"
- net_basic
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
# ---CHANGED--- peer0 from Org1 is the default for this CLI container
- CORE_PEER_ADDRESS=peer0.org1.my.sample:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
# ---CHANGED--- changed to reflect peer0 name, org1 name and our company's domain
- CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.my.sample/peers/peer0.org1.my.sample/tls/server.crt
# ---CHANGED--- changed to reflect peer0 name, org1 name and our company's domain
- CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.my.sample/peers/peer0.org1.my.sample/tls/server.key
# ---CHANGED--- changed to reflect peer0 name, org1 name and our company's domain
- CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.my.sample/peers/peer0.org1.my.sample/tls/ca.crt
# ---CHANGED--- changed to reflect peer0 name, org1 name and our company's domain
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.my.sample/users/[email protected]/msp
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
# ---CHANGED--- command needs to be connected out as we will be issuing commands explicitly, not using by any script
# command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
volumes:
- /var/run/:/host/var/run/
# ---CHANGED--- chaincode path adjusted
- ./chaincode/:/opt/gopath/src/github.com/chaincode
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
depends_on:
# ---CHANGED--- reference to our orderer
- orderer.my.sample
# ---CHANGED--- reference to peer0 of Org1
- peer0.org1.my.sample
# ---CHANGED--- reference to peer0 of Org2
- peer0.org2.my.sample
# ---CHANGED--- reference to peer0 of Org3
- peer0.org3.my.sample
# ---CHANGED--- reference to peer0 of Org4
- peer0.org4.my.sample
networks:
# ---CHANGED--- our network is called "basic"
- net_basic