diff --git a/bin/mainflux-docker.sh b/bin/mainflux-docker.sh index 1463bf9f..baa1bd37 100755 --- a/bin/mainflux-docker.sh +++ b/bin/mainflux-docker.sh @@ -150,7 +150,7 @@ _stop() { printf "\nStopping Nginx...\n\n" docker-compose -f docker/docker-compose.nginx.yml stop - printf "Stopping Mainflux composition...\n\n" + printf "\nStopping Mainflux composition...\n\n" docker-compose -f docker/docker-compose.mainflux.yml stop printf "\nStopping NATS and Cassandra...\n\n" @@ -159,6 +159,19 @@ _stop() { printf "\n*** MAINFLUX IS OFF ***\n\n" } +_clean() { + printf "\nCleaning NATS and Cassandra containers...\n\n" + docker-compose -f docker/docker-compose.infrastructure.yml rm -f + + printf "\nCleaning Mainflux containers...\n\n" + docker-compose -f docker/docker-compose.mainflux.yml rm -f + + printf "\nCleaning Nginx container...\n\n" + docker-compose -f docker/docker-compose.nginx.yml rm -f + + printf "\n*** Docker containers cleaned ***\n\n" +} + _mainflux_docker() { if [[ $1 == "start" ]] then @@ -166,6 +179,9 @@ _mainflux_docker() { elif [[ $1 == "stop" ]] then _stop + elif [[ $1 == "clean" ]] + then + _clean else printf "Unknown command.\n" fi