Skip to content

Commit

Permalink
temporal fix for #48
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonidLe committed Mar 7, 2019
1 parent bc43931 commit 9222eb4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions container-scripts/container-orderer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ if [ ! -f "crypto-config/ordererOrganizations/$DOMAIN/orderers/orderer.$DOMAIN/m
envsubst < "templates/cryptogen-orderer-template.yaml" > "crypto-config/cryptogen-orderer.yaml"
rm -rf crypto-config/ordererOrganizations
cryptogen generate --config=crypto-config/cryptogen-orderer.yaml

mkdir -p crypto-config/ordererOrganizations/$DOMAIN/msp/well-known
cp crypto-config/ordererOrganizations/$DOMAIN/msp/tlscacerts/tlsca.$DOMAIN-cert.pem crypto-config/ordererOrganizations/$DOMAIN/msp/well-known/msp-admin.pem 2>/dev/null
cp crypto-config/ordererOrganizations/$DOMAIN/msp/tlscacerts/tlsca.$DOMAIN-cert.pem crypto-config/ordererOrganizations/$DOMAIN/msp/well-known/tlsca-cert.pem 2>/dev/null
else
echo "Orderer MSP exists. Generation skipped".
fi
Expand Down
4 changes: 4 additions & 0 deletions container-scripts/container-peer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if [ ! -d "crypto-config/peerOrganizations/$ORG.$DOMAIN/peers/peer0.$ORG.$DOMAIN
mv crypto-config/peerOrganizations/$ORG.$DOMAIN/ca/*_sk crypto-config/peerOrganizations/$ORG.$DOMAIN/ca/sk.pem
mv crypto-config/peerOrganizations/$ORG.$DOMAIN/users/Admin@$ORG.$DOMAIN/msp/keystore/*_sk crypto-config/peerOrganizations/$ORG.$DOMAIN/users/Admin@$ORG.$DOMAIN/msp/keystore/sk.pem
cp -r crypto-config/ordererOrganizations/$DOMAIN/msp/* crypto-config/peerOrganizations/$ORG.$DOMAIN/msp 2>/dev/null

mkdir -p crypto-config/peerOrganizations/$ORG.$DOMAIN/msp/well-known
cp crypto-config/peerOrganizations/$ORG.$DOMAIN/msp/tlscacerts/tlsca.$ORG.$DOMAIN-cert.pem crypto-config/peerOrganizations/$ORG.$DOMAIN/msp/well-known/msp-admin.pem 2>/dev/null
cp crypto-config/peerOrganizations/$ORG.$DOMAIN/msp/tlscacerts/tlsca.$ORG.$DOMAIN-cert.pem crypto-config/peerOrganizations/$ORG.$DOMAIN/msp/well-known/tlsca-cert.pem 2>/dev/null
else
echo "$ORG MSP exists. Generation skipped".
fi
1 change: 1 addition & 0 deletions docker-compose-orderer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,6 @@ services:
# - ${WWW_PORT:-8080}:80
volumes:
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp:/usr/share/nginx/html/msp
- ./crypto-config/ordererOrganizations/${DOMAIN:-example.com}/msp/well-known:/usr/share/nginx/html/.well-known
depends_on:
- generate.post-orderer
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ services:
# - peer1
volumes:
- ./crypto-config:/usr/src/app/crypto-config
- ./templates:/usr/src/app/templates
# - ./templates:/usr/src/app/templates
- ${WEBAPP_HOME:-./webapp}:/usr/src/app/webapp
- ./crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/msp:/usr/src/app/msp
- ./crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/users/Admin@${ORG:-org1}.${DOMAIN:-example.com}:/etc/hyperledger/crypto/peeradmin
Expand All @@ -209,6 +209,7 @@ services:
- generate.peer
volumes:
- ./crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/msp:/usr/share/nginx/html/msp
- ./crypto-config/peerOrganizations/${ORG:-org1}.${DOMAIN:-example.com}/msp/well-known:/usr/share/nginx/html/.well-known

networks:
default:
Expand Down

0 comments on commit 9222eb4

Please sign in to comment.