Skip to content

Commit

Permalink
Add cleaning all volume at the beginning of build process. also stops…
Browse files Browse the repository at this point in the history
… all running containers
  • Loading branch information
pclastre committed Sep 2, 2020
1 parent 86db2db commit 9ce622f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9ce622f

Please sign in to comment.