1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-06-10 19:30:20 +02:00

Added --no-ansi and --only-secret-store

This commit is contained in:
Javier Cortejoso 2019-01-16 16:06:27 +01:00
parent c3d9b6a0d5
commit 8a79ca06bf
No known key found for this signature in database
GPG Key ID: FBEEF3131E39EBCF

View File

@ -8,7 +8,7 @@ DIR="${DIR/ /\\ }"
COMPOSE_DIR="${DIR}/compose-files" COMPOSE_DIR="${DIR}/compose-files"
export PROJECT_NAME="ocean" export PROJECT_NAME="ocean"
export forcepull="false" export FORCEPULL="false"
# default to latest versions # default to latest versions
export OCEAN_VERSION=stable export OCEAN_VERSION=stable
@ -58,9 +58,18 @@ COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
DOCKER_COMPOSE_EXTRA_OPTS="${DOCKER_COMPOSE_EXTRA_OPTS:-}"
while :; do while :; do
case $1 in case $1 in
################################################# #################################################
# Disable color
#################################################
--no-ansi)
DOCKER_COMPOSE_EXTRA_OPTS+=" --no-ansi"
unset COLOR_R COLOR_G COLOR_Y COLOR_B COLOR_M COLOR_C COLOR_RESET
;;
#################################################
# Version switches # Version switches
################################################# #################################################
--latest) --latest)
@ -72,7 +81,7 @@ while :; do
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-$OCEAN_VERSION} export PLEUSTON_VERSION=${PLEUSTON_VERSION:-$OCEAN_VERSION}
;; ;;
--force-pull) --force-pull)
export forcepull="true" export FORCEPULL="true"
printf $COLOR_Y'Pulling latest components...\n\n'$COLOR_RESET printf $COLOR_Y'Pulling latest components...\n\n'$COLOR_RESET
;; ;;
################################################# #################################################
@ -94,6 +103,17 @@ while :; do
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}" COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}"
printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET
;; ;;
#################################################
# Only Secret Store
#################################################
--only-secret-store)
COMPOSE_FILES=""
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml"
NODE_COMPOSE_FILE=""
printf $COLOR_Y'Starting only Secret Store...\n\n'$COLOR_RESET
;;
################################################# #################################################
# Contract/Storage switches # Contract/Storage switches
################################################# #################################################
@ -169,11 +189,9 @@ while :; do
;; ;;
*) *)
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
if [[ $forcepull == "true" ]] [ ! -z ${NODE_COMPOSE_FILE} ] && COMPOSE_FILES+=" -f ${NODE_COMPOSE_FILE}"
then [ ${FORCEPULL} = "true" ] && docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES pull
docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} pull eval docker-compose $DOCKER_COMPOSE_EXTRA_OPTS --project-name=$PROJECT_NAME $COMPOSE_FILES up --remove-orphans
fi
eval docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_COMPOSE_FILE} up --remove-orphans
break break
esac esac
shift shift