Skip to content

Commit

Permalink
avoid pull new config on upgrade and downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Jan 24, 2024
1 parent c67571e commit f535722
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions scripts/nm-quick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ if [ $(id -u) -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi

# increase the timeouts
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120
unset INSTALL_TYPE
unset BUILD_TAG
unset IMAGE_TAG
Expand Down Expand Up @@ -587,9 +589,7 @@ install_netmaker() {

echo "Starting containers..."

# increase the timeouts
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120


# start docker and rebuild containers / networks
cd "${SCRIPT_DIR}"
Expand Down Expand Up @@ -721,7 +721,11 @@ upgrade() {
read -p "Tenant ID: " TENANT_ID
done
save_config
install_netmaker
# start docker and rebuild containers / networks
cd "${SCRIPT_DIR}"
docker-compose up -d --force-recreate
cd -
wait_seconds 2
}

downgrade () {
Expand All @@ -733,7 +737,11 @@ downgrade () {
if [ -a "$SCRIPT_DIR"/docker-compose.override.yml ]; then
rm -f "$SCRIPT_DIR"/docker-compose.override.yml
fi
install_netmaker
# start docker and rebuild containers / networks
cd "${SCRIPT_DIR}"
docker-compose up -d --force-recreate
cd -
wait_seconds 2
}


Expand Down

0 comments on commit f535722

Please sign in to comment.