diff --git a/.env b/.env index 8fa94d0..faa6ee2 100644 --- a/.env +++ b/.env @@ -1,11 +1,13 @@ # Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. -DEPLOY_CONTRACTS=true +KEEPER_DEPLOY_CONTRACTS=true + +# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local +KEEPER_NETWORK_NAME=development +KEEPER_ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts + # Ganache specific option, these two options have no effect when not running ganache-cli GANACHE_DATABASE_PATH=. -REUSE_DATABASE=false -# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local -KEEPER_NETWORK_NAME=ganache -ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts +GANACHE_REUSE_DATABASE=false + # Specify which ocean version use: stable, latests, ... OCEAN_VERSION=stable -COMPOSE_FILE=docker-compose.yml diff --git a/brizo.env b/brizo.env index 91a7b50..e4106ff 100755 --- a/brizo.env +++ b/brizo.env @@ -7,7 +7,7 @@ PARITY_PASSWORD=node0 AQUARIUS_URL=http://aquarius:5000 BRIZO_URL=http://brizo:8030 SECRET_STORE_URL=http://secret-store:12001 -RPC_URL=${KEEPER_URL} +RPC_URL=http://blockchain-node:8545 AZURE_ACCOUNT_NAME= AZURE_ACCOUNT_KEY= diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index b6d5bdc..70c3e14 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -12,6 +12,6 @@ services: env_file: - ${BRIZO_ENV_FILE} environment: - KEEPER_URL: http://${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} + KEEPER_URL: ${KEEPER_RPC_URL} volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 1770eec..d2402f0 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -6,11 +6,13 @@ services: backend: ipv4_address: 172.15.0.14 environment: - LOCAL_CONTRACTS: "false" - DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - REUSE_DATABASE: "false" + DEPLOY_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} + REUSE_DATABASE: ${GANACHE_REUSE_DATABASE} + DATABASE_PATH: "/ganache-db" NETWORK_NAME: ${KEEPER_NETWORK_NAME} - POA_HOST: ${KEEPER_RPC_URL} + KEEPER_RPC_HOST: ${KEEPER_RPC_HOST} + KEEPER_RPC_PORT: ${KEEPER_RPC_PORT} + KEEPER_RPC_URL: ${KEEPER_RPC_URL} depends_on: - blockchain-node volumes: diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 4f8464e..41145c2 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -14,6 +14,6 @@ services: # Need browser to connect to exposed ports KEEPER_HOST: localhost AQUARIUS_HOST: localhost - LOCAL_CONTRACTS: ${DEPLOY_CONTRACTS} + LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} volumes: - - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro diff --git a/start_ocean.sh b/start_ocean.sh index 4723971..7e74e6c 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -18,10 +18,9 @@ export GANACHE_REUSE_DATABASE="false" export BRIZO_ENV_FILE=$DIR/brizo.env # Specify the ethereum default RPC container provider -export KEEPER_RPC_URL='blockchain-node' +export KEEPER_RPC_HOST='blockchain-node' export KEEPER_RPC_PORT='8545' -export KEEPER_URL="http://"${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} - +export KEEPER_RPC_URL="http://"${KEEPER_RPC_HOST}:${KEEPER_RPC_PORT} # colors COLOR_R="\033[0;31m" # red @@ -112,15 +111,15 @@ while :; do # Cleaning switches ################################################# --purge) - docker network rm $PROJECT_NAME_backend || true - docker network rm $PROJECT_NAME_default || true - docker volume rm $PROJECT_NAME_parity-node || true - docker volume rm $PROJECT_NAME_secret-store || true - read -p "Are you sure you want to delete $ARTIFACTS_FOLDER? " -n 1 -r + docker network rm ${PROJECT_NAME}_backend || true + docker network rm ${PROJECT_NAME}_default || true + docker volume rm ${PROJECT_NAME}_parity-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 echo if [[ $REPLY =~ ^[Yy]$ ]] then - rm -rf $ARTIFACTS_FOLDER + rm -rf ${KEEPER_ARTIFACTS_FOLDER} fi ;; --) # End of all options.