Add custom env variables for each ocean component version

This commit is contained in:
Javier Cortejoso 2018-12-19 10:52:44 +01:00
parent f86ad200f5
commit ae4fc7aa01
No known key found for this signature in database
GPG Key ID: FBEEF3131E39EBCF
6 changed files with 27 additions and 22 deletions

View File

@ -1,7 +1,7 @@
version: '2.1' version: '2.1'
services: services:
aquarius: aquarius:
image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable} image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
ports: ports:
- 5000:5000 - 5000:5000
networks: networks:

View File

@ -1,7 +1,7 @@
version: '2.1' version: '2.1'
services: services:
brizo: brizo:
image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} image: oceanprotocol/brizo:${BRIZO_VERSION:-stable}
ports: ports:
- 8030:8030 - 8030:8030
networks: networks:

View File

@ -1,7 +1,7 @@
version: '2.1' version: '2.1'
services: services:
keeper-contracts: keeper-contracts:
image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} image: oceanprotocol/keeper-contracts:${KEEPER_VERSION:-stable}
networks: networks:
backend: backend:
ipv4_address: 172.15.0.14 ipv4_address: 172.15.0.14

View File

@ -1,7 +1,7 @@
version: '2.1' version: '2.1'
services: services:
pleuston: pleuston:
image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable} image: oceanprotocol/pleuston:${PLEUSTON_VERSION:-stable}
networks: networks:
backend: backend:
ipv4_address: 172.15.0.19 ipv4_address: 172.15.0.19

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
DIR="${DIR/ /\\ }"
COMPOSE_DIR="${DIR}/compose-files" COMPOSE_DIR="${DIR}/compose-files"
export PROJECT_NAME="ocean" export PROJECT_NAME="ocean"
@ -11,10 +12,10 @@ export OCEAN_VERSION=stable
# keeper options # keeper options
export KEEPER_DEPLOY_CONTRACTS="false" export KEEPER_DEPLOY_CONTRACTS="false"
export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts export KEEPER_ARTIFACTS_FOLDER="${HOME}/.ocean/keeper-contracts/artifacts"
# Specify which ethereum client to run or connect to: development, kovan, spree or nile # Specify which ethereum client to run or connect to: development, kovan, spree or nile
export KEEPER_NETWORK_NAME="nile" export KEEPER_NETWORK_NAME="nile"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml"
# Ganache specific option, these two options have no effect when not running ganache-cli # Ganache specific option, these two options have no effect when not running ganache-cli
export GANACHE_DATABASE_PATH="${DIR}" export GANACHE_DATABASE_PATH="${DIR}"
@ -61,6 +62,10 @@ while :; do
--latest) --latest)
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
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-$OCEAN_VERSION}
export BRIZO_VERSION=${BRIZO_VERSION:-$OCEAN_VERSION}
export KEEPER_VERSION=${KEEPER_VERSION:-$OCEAN_VERSION}
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-$OCEAN_VERSION}
;; ;;
--force-pull) --force-pull)
export forcepull='true' export forcepull='true'
@ -70,19 +75,19 @@ while :; do
# Exclude switches # Exclude switches
################################################# #################################################
--no-pleuston) --no-pleuston)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/} COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}"
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
;; ;;
--no-brizo) --no-brizo)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/brizo.yml/} COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/brizo.yml/}"
printf $COLOR_Y'Starting without Brizo...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Brizo...\n\n'$COLOR_RESET
;; ;;
--no-aquarius) --no-aquarius)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/} COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}"
printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET
;; ;;
--no-secret-store) --no-secret-store)
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
;; ;;
################################################# #################################################
@ -97,14 +102,14 @@ while :; do
################################################# #################################################
# connects you to kovan # connects you to kovan
--local-kovan-node) --local-kovan-node)
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/kovan_node.yml export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/kovan_node.yml"
export KEEPER_NETWORK_NAME="kovan" export KEEPER_NETWORK_NAME="kovan"
printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET
;; ;;
# spins up a new ganache blockchain # spins up a new ganache blockchain
--local-ganache-node) --local-ganache-node)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/ganache_node.yml export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/ganache_node.yml"
export KEEPER_NETWORK_NAME="development" export KEEPER_NETWORK_NAME="development"
export KEEPER_DEPLOY_CONTRACTS="true" export KEEPER_DEPLOY_CONTRACTS="true"
#rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json #rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json
@ -112,14 +117,14 @@ while :; do
;; ;;
# connects you to nile ocean testnet # connects you to nile ocean testnet
--local-nile-node) --local-nile-node)
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml"
export KEEPER_NETWORK_NAME="nile" export KEEPER_NETWORK_NAME="nile"
printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET
;; ;;
# spins up spree local testnet # spins up spree local testnet
--local-spree-node) --local-spree-node)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/spree_node.yml export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/spree_node.yml"
export KEEPER_NETWORK_NAME="spree" export KEEPER_NETWORK_NAME="spree"
export KEEPER_DEPLOY_CONTRACTS="true" export KEEPER_DEPLOY_CONTRACTS="true"
#rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json #rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json
@ -140,7 +145,7 @@ while :; do
echo echo
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
rm -rf ${KEEPER_ARTIFACTS_FOLDER} rm -rf "${KEEPER_ARTIFACTS_FOLDER}"
fi fi
;; ;;
--) # End of all options. --) # End of all options.