6
6
version : ' 2'
7
7
8
8
services :
9
- ca0 :
9
+ org1ca1 :
10
10
image : ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
11
11
environment :
12
12
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
@@ -25,9 +25,12 @@ services:
25
25
volumes :
26
26
- ./channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
27
27
- ./tls/fabricca/certs/server:/etc/hyperledger/fabric-ca-server-config
28
- container_name : ca_peerOrg1
28
+ networks :
29
+ default :
30
+ aliases :
31
+ - ca_peerOrg1
29
32
30
- ca1 :
33
+ org2ca1 :
31
34
image : ${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}-${FABRIC_CA_FIXTURE_TAG}
32
35
environment :
33
36
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
@@ -46,10 +49,12 @@ services:
46
49
volumes :
47
50
- ./channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
48
51
- ./tls/fabricca/certs/server:/etc/hyperledger/fabric-ca-server-config
49
- container_name : ca_peerOrg2
52
+ networks :
53
+ default :
54
+ aliases :
55
+ - ca_peerOrg2
50
56
51
- orderer.example.com :
52
- container_name : orderer.example.com
57
+ orderer1 :
53
58
image : ${FABRIC_ORDERER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_ORDERER_FIXTURE_TAG}
54
59
environment :
55
60
- ORDERER_GENERAL_LOGLEVEL=debug
@@ -73,79 +78,119 @@ services:
73
78
- ./channel:/etc/hyperledger/configtx
74
79
- ./channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/etc/hyperledger/msp/orderer
75
80
- ./channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/etc/hyperledger/tls/orderer
81
+ networks :
82
+ default :
83
+ aliases :
84
+ - orderer.example.com
76
85
77
- peer0.org1.example.com :
78
- container_name : peer0.org1.example.com
86
+ org1peer1 :
79
87
image : ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
80
88
environment :
81
89
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
82
90
- CORE_PEER_ID=peer0.org1.example.com
83
91
- CORE_LOGGING_PEER=debug
92
+ - CORE_CHAINCODE_STARTUPTIMEOUT=30s
93
+ - CORE_CHAINCODE_LOGGING_SHIM=debug
94
+ - CORE_CHAINCODE_LOGGING_LEVEL=debug
95
+ - CORE_CHAINCODE_BUILDER=${FABRIC_BUILDER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BUILDER_FIXTURE_TAG}
96
+ - CORE_CHAINCODE_GOLANG_RUNTIME=${FABRIC_BASEOS_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BASEOS_FIXTURE_TAG}
84
97
# # the following setting redirects chaincode container logs to the peer container logs
85
98
- CORE_VM_DOCKER_ATTACHSTDOUT=true
86
99
- CORE_PEER_LOCALMSPID=Org1MSP
87
100
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
88
- - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
101
+ - CORE_PEER_ADDRESS=0.0.0.0:7051
102
+ - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052
103
+ - CORE_PEER_ADDRESSAUTODETECT=true
104
+ - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
89
105
- CORE_PEER_TLS_ENABLED=true
90
106
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/peer/server.key
91
107
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/peer/server.crt
92
108
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/peer/ca.crt
93
109
# # the following setting starts chaincode containers on the same
94
110
# # bridge network as the peers
95
111
# # https://docs.docker.com/compose/networking/
96
- - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fixtures_default
112
+ - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID}
113
+ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default
97
114
# comment out logging.driver in order to render the debug logs
98
115
logging :
99
116
driver : none
100
117
working_dir : /opt/gopath/src/github.com/hyperledger/fabric
101
118
command : peer node start
102
119
ports :
103
- - 7051:7051
104
- - 7053:7053
120
+ - " 7051:7051"
121
+ - " 7053:7053"
122
+ expose :
123
+ - " 7051"
124
+ - " 7052"
125
+ - " 7053"
105
126
volumes :
106
127
- /var/run/:/host/var/run/
107
128
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer
108
129
- ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/tls/peer
130
+ networks :
131
+ default :
132
+ aliases :
133
+ - peer0.org1.example.com
109
134
depends_on :
110
- - orderer.example.com
135
+ - orderer1
111
136
- builder
112
137
113
- peer0.org2.example.com :
114
- container_name : peer0.org2.example.com
138
+ org2peer1 :
115
139
image : ${FABRIC_PEER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_PEER_FIXTURE_TAG}
116
140
environment :
117
141
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
118
142
- CORE_PEER_ID=peer0.org2.example.com
119
143
- CORE_LOGGING_PEER=debug
144
+ - CORE_CHAINCODE_STARTUPTIMEOUT=30s
145
+ - CORE_CHAINCODE_LOGGING_SHIM=debug
146
+ - CORE_CHAINCODE_LOGGING_LEVEL=debug
147
+ - CORE_CHAINCODE_BUILDER=${FABRIC_BUILDER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BUILDER_FIXTURE_TAG}
148
+ - CORE_CHAINCODE_GOLANG_RUNTIME=${FABRIC_BASEOS_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BASEOS_FIXTURE_TAG}
149
+ # # the following setting redirects chaincode container logs to the peer container logs
150
+ - CORE_VM_DOCKER_ATTACHSTDOUT=true
120
151
- CORE_PEER_LOCALMSPID=Org2MSP
121
152
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
122
- - CORE_PEER_ADDRESS=peer0.org2.example.com:7051
153
+ - CORE_PEER_ADDRESS=0.0.0.0:7051
154
+ - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7052
155
+ - CORE_PEER_ADDRESSAUTODETECT=true
156
+ - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051
123
157
- CORE_PEER_TLS_ENABLED=true
124
158
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/peer/server.key
125
159
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/tls/peer/server.crt
126
160
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/tls/peer/ca.crt
127
161
# # the following setting starts chaincode containers on the same
128
162
# # bridge network as the peers
129
163
# # https://docs.docker.com/compose/networking/
130
- - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fixtures_default
164
+ - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID}
165
+ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default
131
166
# comment out logging.driver in order to render the debug logs
132
167
logging :
133
168
driver : none
134
169
working_dir : /opt/gopath/src/github.com/hyperledger/fabric
135
170
command : peer node start
136
171
ports :
137
- - 8051:7051
138
- - 8053:7053
172
+ - " 8051:7051"
173
+ - " 8053:7053"
174
+ expose :
175
+ - " 7051"
176
+ - " 7052"
177
+ - " 7053"
139
178
volumes :
140
179
- /var/run/:/host/var/run/
141
180
- ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/msp/peer
142
- - ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/tls/peer
181
+ - ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/tls/peer
182
+ networks :
183
+ default :
184
+ aliases :
185
+ - peer0.org2.example.com
143
186
depends_on :
144
- - orderer.example.com
187
+ - orderer1
145
188
- builder
146
189
147
-
148
190
# builder is only here to create a dependency on the image (not used as part of compose)
149
191
builder :
150
192
image : ${FABRIC_BUILDER_FIXTURE_IMAGE}:${ARCH}-${FABRIC_BUILDER_FIXTURE_TAG}
151
193
command : tail -F anything
194
+
195
+ networks :
196
+ default :
0 commit comments