forked from jbossdemocentral/rhdm7-loan-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-docker.sh
executable file
·109 lines (96 loc) · 4.69 KB
/
init-docker.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh
. ./init-properties.sh
# wipe screen.
clear
echo
echo "#################################################################"
echo "## ##"
echo "## Setting up the ${DEMO} ##"
echo "## ##"
echo "## ##"
echo "## #### # # #### # # ##### # # ##"
echo "## # # # # # # # # # # # # # ##"
echo "## #### ##### # # # # # ### # ##"
echo "## # # # # # # # # # # # ##"
echo "## # # # # #### # # # # # # ##"
echo "## ##"
echo "## brought to you by, ##"
echo "## ${AUTHORS} ##"
echo "## ##"
echo "## ##"
echo "## ${PROJECT} ##"
echo "## ##"
echo "#################################################################"
echo
# make some checks first before proceeding.
if [ -r $SRC_DIR/$EAP ] || [ -L $SRC_DIR/$EAP ]; then
echo Product sources are present...
echo
else
echo Need to download $EAP package from http://developers.redhat.com
echo and place it in the $SRC_DIR directory to proceed...
echo
exit
fi
#if [ -r $SRC_DIR/$EAP_PATCH ] || [ -L $SRC_DIR/$EAP_PATCH ]; then
# echo Product patches are present...
# echo
#else
# echo Need to download $EAP_PATCH package from the Customer Portal
# echo and place it in the $SRC_DIR directory to proceed...
# echo
# exit
#fi
if [ -r $SRC_DIR/$DM_DECISION_CENTRAL ] || [ -L $SRC_DIR/$DM_DECISION_CENTRAL ]; then
echo Product sources are present...
echo
else
echo Need to download $DM_DECISION_CENTRAL zip from http://developers.redhat.com
echo and place it in the $SRC_DIR directory to proceed...
echo
exit
fi
if [ -r $SRC_DIR/$DM_KIE_SERVER ] || [ -L $SRC_DIR/$DM_KIE_SERVER ]; then
echo Product sources are present...
echo
else
echo Need to download $DM_KIE_SERVER zip from http://developers.redhat.com
echo and place it in the $SRC_DIR directory to proceed...
echo
exit
fi
cp support/docker/Dockerfile .
cp support/docker/.dockerignore .
echo Starting Docker builds.
echo
docker build --no-cache -t jbossdemocentral/rhdm7-loan-demo --build-arg DM_VERSION=$DM_VERSION --build-arg DM_DECISION_CENTRAL=$DM_DECISION_CENTRAL --build-arg DM_KIE_SERVER=$DM_KIE_SERVER --build-arg EAP=$EAP --build-arg JBOSS_EAP=$JBOSS_EAP --build-arg PROJECT_GIT_REPO=$PROJECT_GIT_REPO --build-arg NIOGIT_PROJECT_GIT_REPO=$NIOGIT_PROJECT_GIT_REPO .
if [ $? -ne 0 ]; then
echo
echo Error occurred during Docker build!
echo Consult the Docker build output for more information.
exit
fi
echo Docker build finished.
echo
rm Dockerfile
rm Dockerfile-ui
echo
echo "=================================================================================="
echo "= ="
echo "= You can now start the $PRODUCT in a Docker container with: ="
echo "= ="
echo "= docker run -it -p 8080:8080 -p 9990:9990 jbossdemocentral/rhdm7-loan-demo ="
echo "= ="
echo "= Login into Decision Central at: ="
echo "= ="
echo "= http://localhost:8080/decision-central (u:dmAdmin / p:redhatdm1!) ="
echo "= ="
echo "= Login into Quick Loan Bank application at: ="
echo "= ="
echo "= http://localhost:3000 ="
echo "= ="
echo "= See README.md for general details to run the various demo cases. ="
echo "= ="
echo "= $PRODUCT $VERSION $DEMO Setup Complete. ="
echo "= ="
echo "=================================================================================="