Skip to content

Commit a080da3

Browse files
author
Salman Baset
committed
[FAB-8958] Add org3 removal to byfn.sh
When running the sample "Adding an Org to a Channel", then upon clean up, ./eyfn.sh -m down script must be run before ./byfn.sh -m down; otherwise, org3 containers and volumes and containers do not get cleaned properly. This patch adds the org3 container and volume cleanup to ./byfn.sh so that a user does not have to worry about the correct execution ordering of ./eyfn.sh and ./byfn.sh scripts. Change-Id: Ieac1adc4081d59943286cfe9139a74395986460b Signed-off-by: Salman Baset <sabaset@us.ibm.com>
1 parent 2bbb0a8 commit a080da3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

first-network/byfn.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ function upgradeNetwork () {
232232

233233
# Tear down running network
234234
function networkDown () {
235-
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH down --volumes
236-
docker-compose -f $COMPOSE_FILE down --volumes
235+
# stop org3 containers also in addition to org1 and org2, in case we were running sample to add org3
236+
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_ORG3 down --volumes
237+
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 down --volumes
238+
237239
# Don't remove the generated artifacts -- note, the ledgers are always removed
238240
if [ "$MODE" != "restart" ]; then
239241
# Bring down the network, deleting the volumes
@@ -440,6 +442,9 @@ CHANNEL_NAME="mychannel"
440442
COMPOSE_FILE=docker-compose-cli.yaml
441443
#
442444
COMPOSE_FILE_COUCH=docker-compose-couch.yaml
445+
# org3 docker compose file
446+
COMPOSE_FILE_ORG3=docker-compose-org3.yaml
447+
#
443448
# use golang as the default language for chaincode
444449
LANGUAGE=golang
445450
# default image tag

0 commit comments

Comments
 (0)