Skip to content

Commit 3715b3e

Browse files
committed
update docker file
Signed-off-by: Osama Rabea <[email protected]>
1 parent b3d1638 commit 3715b3e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/setup-docker/templates/fabric-docker/docker-compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,12 @@ services:
364364
- LOG_CONSOLE_STDOUT=true
365365
- DISCOVERY_AS_LOCALHOST=false
366366
- CORE_PEER_TLS_ENABLED=true
367-
- CORE_PEER_TLS_CERT_FILE=/tmp/crypto/peerOrganizations/<%= orgs[0].domain %>/peers/<%= orgs[0].headPeer.address %>/tls/server.crt
368-
- CORE_PEER_TLS_KEY_FILE=/tmp/crypto/peerOrganizations/<%= orgs[0].domain %>/peers/<%= orgs[0].headPeer.address %>/tls/server.key
369-
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/crypto/peerOrganizations/<%= orgs[0].domain %>/peers/<%= orgs[0].headPeer.address %>/tls/ca.crt
367+
<%_ const peerOrg = orgs.find(org => org.peers && org.peers.length > 0); _%>
368+
<%_ if (peerOrg && peerOrg.peers[0]) { _%>
369+
- CORE_PEER_TLS_CERT_FILE=/tmp/crypto/peerOrganizations/<%= peerOrg.domain %>/peers/<%= peerOrg.peers[0].address %>/tls/server.crt
370+
- CORE_PEER_TLS_KEY_FILE=/tmp/crypto/peerOrganizations/<%= peerOrg.domain %>/peers/<%= peerOrg.peers[0].address %>/tls/server.key
371+
- CORE_PEER_TLS_ROOTCERT_FILE=/tmp/crypto/peerOrganizations/<%= peerOrg.domain %>/peers/<%= peerOrg.peers[0].address %>/tls/ca.crt
372+
<%_ } _%>
370373
volumes:
371374
- ../fabric-config/explorer/config.json:/opt/explorer/app/platform/fabric/config.json
372375
- ../fabric-config/explorer/connection-profile.json:/opt/explorer/app/platform/fabric/connection-profile/connection-profile.json

0 commit comments

Comments
 (0)