mirror of
https://github.com/oceanprotocol/barge.git
synced 2024-12-02 05:57:21 +01:00
Merge pull request #44 from oceanprotocol/feature/clean_env
Added --clean-all option to clean volumes and network
This commit is contained in:
commit
0ca2ef6344
@ -66,6 +66,7 @@ Option | Description
|
||||
`--no-pleuston` | Start up Ocean without an instance of `pleuston`. Helpful for development on `pleuston`.
|
||||
`--local-parity-node` | Runs a local parity POA node and Secret Store instead of ganache-cli.
|
||||
`--reuse-database` | Start up Ocean and reuse the Database from ganache. Helpful for development.
|
||||
`--purge` | Remove the volumes, local folder and networks used by the script.
|
||||
|
||||
For example, if you do:
|
||||
|
||||
|
@ -8,6 +8,7 @@ export REUSE_DATABASE="false"
|
||||
# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local
|
||||
export KEEPER_NETWORK_NAME="ganache"
|
||||
export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts
|
||||
export PROJECT_NAME="ocean"
|
||||
export BRIZO_ENV_FILE=./brizo.env
|
||||
|
||||
# colors
|
||||
@ -52,17 +53,29 @@ while :; do
|
||||
COMPOSE_FILE='docker-compose-local-parity-node.yml'
|
||||
printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET
|
||||
;;
|
||||
--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
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
rm -rf $ARTIFACTS_FOLDER
|
||||
fi
|
||||
;;
|
||||
--) # End of all options.
|
||||
shift
|
||||
break
|
||||
;;
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-?*)
|
||||
printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2
|
||||
break
|
||||
;;
|
||||
printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2
|
||||
break
|
||||
;;
|
||||
*)
|
||||
printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET
|
||||
docker-compose --project-name=ocean -f $COMPOSE_FILE up
|
||||
docker-compose --project-name=$PROJECT_NAME -f $COMPOSE_FILE up
|
||||
break
|
||||
esac
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user