mirror of
https://github.com/oceanprotocol/barge.git
synced 2024-10-31 23:55:18 +01:00
added --froce-pull
fixed --purge
This commit is contained in:
parent
8b24ab4748
commit
8152b32c8d
@ -4,6 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
|||||||
COMPOSE_DIR="${DIR}/compose-files"
|
COMPOSE_DIR="${DIR}/compose-files"
|
||||||
|
|
||||||
export PROJECT_NAME="ocean"
|
export PROJECT_NAME="ocean"
|
||||||
|
export forcepull="false"
|
||||||
|
|
||||||
# default to latest versions
|
# default to latest versions
|
||||||
export OCEAN_VERSION=stable
|
export OCEAN_VERSION=stable
|
||||||
|
|
||||||
@ -60,6 +62,10 @@ while :; do
|
|||||||
export OCEAN_VERSION=latest
|
export OCEAN_VERSION=latest
|
||||||
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
|
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
|
||||||
;;
|
;;
|
||||||
|
--force-pull)
|
||||||
|
export forcepull='true'
|
||||||
|
printf $COLOR_Y'Pulling latest components...\n\n'$COLOR_RESET
|
||||||
|
;;
|
||||||
#################################################
|
#################################################
|
||||||
# Exclude switches
|
# Exclude switches
|
||||||
#################################################
|
#################################################
|
||||||
@ -123,8 +129,11 @@ while :; do
|
|||||||
# Cleaning switches
|
# Cleaning switches
|
||||||
#################################################
|
#################################################
|
||||||
--purge)
|
--purge)
|
||||||
docker network rm ${PROJECT_NAME}_backend || true
|
printf $COLOR_R'Doing a deep clean ...\n\n'$COLOR_RESET
|
||||||
|
docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} down
|
||||||
docker network rm ${PROJECT_NAME}_default || true
|
docker network rm ${PROJECT_NAME}_default || true
|
||||||
|
docker network rm ${PROJECT_NAME}_backend || true
|
||||||
|
docker network rm ${PROJECT_NAME}_secretstore || true
|
||||||
docker volume rm ${PROJECT_NAME}_keeper-node || true
|
docker volume rm ${PROJECT_NAME}_keeper-node || true
|
||||||
docker volume rm ${PROJECT_NAME}_secret-store || true
|
docker volume rm ${PROJECT_NAME}_secret-store || true
|
||||||
read -p "Are you sure you want to delete $KEEPER_ARTIFACTS_FOLDER? " -n 1 -r
|
read -p "Are you sure you want to delete $KEEPER_ARTIFACTS_FOLDER? " -n 1 -r
|
||||||
@ -144,6 +153,10 @@ while :; do
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
|
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
|
||||||
|
if [[ forcepull == 'true' ]]
|
||||||
|
then
|
||||||
|
docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} pull
|
||||||
|
fi
|
||||||
docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} up --remove-orphans
|
docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} up --remove-orphans
|
||||||
break
|
break
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user