From 9ce622f032f117644fc6e845f14d51ced157e6ec Mon Sep 17 00:00:00 2001 From: Philippe Clastre Date: Wed, 2 Sep 2020 18:10:10 +0200 Subject: [PATCH] Add cleaning all volume at the beginning of build process. also stops all running containers --- build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.sh b/build.sh index 9a7f5d9..8328c87 100755 --- a/build.sh +++ b/build.sh @@ -72,6 +72,15 @@ if [ -z $MODE ]; then exit fi +if [ "$MODE" == "prod" ]; + echo -n "Would do like to reinitialize all docker volumes (this will delete previous data) ? [o/n] " + read rep + if [ "$rep" == "o" ]; then + docker-compose down + docker system prune -f + fi +fi + if [ "$MODE" == "prod" -a -z "$DOMAIN" ]; then DOMAIN="w3.avignon.inra.fr/bas_insylva/" echo "INFO: no domain defined. Using $DOMAIN"