1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-12-02 05:57:21 +01:00

Merge pull request #84 from oceanprotocol/feature/force_pull

added --force-pull & fixed --purge
This commit is contained in:
Sebastian Gerske 2018-12-17 11:10:48 +01:00 committed by GitHub
commit a96cd29d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -73,6 +73,7 @@ The `./start_ocean.sh` script provides the following options:
Option | Description
----------------------------| -----------
`--latest` | `latest` means to use the latest `develop` branches whereas `stable` means to use the last `stable` releases.
`--force-pull` | Force pulling the latest revision of the used docker images.
`--no-pleuston` | Start up Ocean without the `pleuston` Building Block. Helpful for development on `pleuston`.
`--no-aquarius` | Start up Ocean without the `aquarius` Building Block.
`--no-brizo` | Start up Ocean without the `brizo` Building Block.

View File

@ -4,6 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
COMPOSE_DIR="${DIR}/compose-files"
export PROJECT_NAME="ocean"
export forcepull="false"
# default to latest versions
export OCEAN_VERSION=stable
@ -60,6 +62,10 @@ while :; do
export OCEAN_VERSION=latest
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
#################################################
@ -123,8 +129,11 @@ while :; do
# Cleaning switches
#################################################
--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}_backend || true
docker network rm ${PROJECT_NAME}_secretstore || true
docker volume rm ${PROJECT_NAME}_keeper-node || true
docker volume rm ${PROJECT_NAME}_secret-store || true
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
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
break
esac