-
Notifications
You must be signed in to change notification settings - Fork 0
/
stop.sh
39 lines (34 loc) · 1.69 KB
/
stop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
REMOVEVOLUMES=$1;
function print_green() {
echo -e "\e[32m$1\e[0m"
}
function print_error() {
echo -e "\e[31m$1\e[0m"
}
print_error "███████╗████████╗ ██████╗ ██████╗ "
print_error "██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗ "
print_error "███████╗ ██║ ██║ ██║██████╔╝"
print_error "╚════██║ ██║ ██║ ██║██╔═══╝ "
print_error "███████║ ██║ ╚██████╔╝██║ "
print_error "╚══════╝ ╚═╝ ╚═════╝ ╚═╝ "
echo
print_error "Stopping the Environment";
if [[ "$REMOVEVOLUMES" = '--remove-volumes' ]]
then
print_error "Removing all Volumes (you will lose your data)";
docker-compose -f docker-compose-backend-services.yml down -v;
docker-compose -f docker-compose-frontend-service.yml down -v;
docker-compose -f docker-compose-zipkin-eureka.yml down -v;
docker-compose -f docker-compose-rabbitmq.yml down -v;
docker-compose -f docker-compose-infra.yml down -v;
docker-compose -f docker-compose-ELK-stack.yml down -v;
else
print_error "Removing all containers keeping the volumes";
docker-compose -f docker-compose-backend-services.yml down;
docker-compose -f docker-compose-frontend-service.yml down;
docker-compose -f docker-compose-zipkin-eureka.yml down;
docker-compose -f docker-compose-rabbitmq.yml down;
docker-compose -f docker-compose-infra.yml down;
docker-compose -f docker-compose-ELK-stack.yml down;
fi