forked from dataduke/epizza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerize.sh
executable file
·48 lines (40 loc) · 1.67 KB
/
dockerize.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
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
set -e
COMPONENT=${@:-all}
RED='\033[0;31m'
NC='\033[0m' # No Color
if echo ${COMPONENT} | grep -q 'all\|infra\|config'; then
echo
echo -e "${RED}+-------------------------------------------+${NC}"
echo -e "${RED}| dockerizing 'config-server' |${NC}"
echo -e "${RED}+-------------------------------------------+${NC}"
./config-server/gradlew -p config-server buildDockerImage -x check
fi
if echo ${COMPONENT} | grep -q 'all\|service\|order'; then
echo
echo -e "${RED}+-------------------------------------------+${NC}"
echo -e "${RED}| dockerizing 'order' |${NC}"
echo -e "${RED}+-------------------------------------------+${NC}"
./order/gradlew -p order buildDockerImage -x check
fi
if echo ${COMPONENT} | grep -q 'all\|service\|bakery'; then
echo
echo -e "${RED}+-------------------------------------------+${NC}"
echo -e "${RED}| dockerizing 'bakery' |${NC}"
echo -e "${RED}+-------------------------------------------+${NC}"
./bakery/gradlew -p bakery buildDockerImage -x check
fi
if echo ${COMPONENT} | grep -q 'all\|ui\|delivery'; then
echo
echo -e "${RED}+-------------------------------------------+${NC}"
echo -e "${RED}| dockerizing 'delivery' |${NC}"
echo -e "${RED}+-------------------------------------------+${NC}"
./delivery/gradlew -p delivery buildDockerImage -x check
fi
if echo ${COMPONENT} | grep -q 'all\|ui\|web'; then
echo
echo -e "${RED}+-------------------------------------------+${NC}"
echo -e "${RED}| dockerizing 'order-ui' |${NC}"
echo -e "${RED}+-------------------------------------------+${NC}"
docker build --no-cache -t epizza/order-ui:latest order-ui
fi