-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-war.sh
executable file
·65 lines (55 loc) · 2.24 KB
/
run-war.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
#!/usr/bin/env bash
shopt -s extglob
set -x
local_path="$(cd "$( dirname "$0" )" && pwd)"
maven_base_url=https://repo1.maven.org/maven2/com/arcadeanalytics
arcade_path=./arcade-single-war
arcade_ver=1.0.7
#prod will use postgres and elastic standalone
arcade_profiles=prod
#prod will h2db and elastic embedded
#arcade_profiles=prod-single
connectors_path=$arcade_path/arcade-connectors
connectors_ver=1.0.12
connectors="arcade-connectors-neo4j3|arcade-connectors-orientdb3|arcade-connectors-gremlin|arcade-connectors-rdbms"
if [ ! -d $connectors_path ]; then
echo "create connectors dir $connectors_path"
mkdir -p $connectors_path
fi
for connector in ${connectors//|/ }
do
if [ ! -f "$connectors_path/$connector-$connectors_ver.jar" ]; then
echo "--> remove prevoius version of '$connector' "
rm $connectors_path/$connector*.jar
echo "--> download ArcadeAnalytics '$connector' version: $connectors_ver"
curl -o $connectors_path/$connector-$connectors_ver.jar \
$maven_base_url/$connector/$connectors_ver/$connector-$connectors_ver.jar
fi
done
if [ ! -f arcadeanalytics-$arcade_ver.war ]; then
echo "--> download ArcadeAnalytics war"
curl -o arcadeanalytics-$arcade_ver.war \
$maven_base_url/arcadeanalytics/$arcade_ver/arcadeanalytics-$arcade_ver.war
fi
spring_data=""
if [ $arcade_profiles == "prod" ]; then
spring_data="--spring.datasource.url=jdbc:postgresql://localhost:5432/arcadeanalytics
--spring.datasource.username=arcadeanalytics
--spring.datasource.password=arcadeanalytics
--spring.data.elasticsearch.cluster_nodes=localhhost:9300
"
fi
java -jar arcadeanalytics-$arcade_ver.war \
--spring.profiles.active=$arcade_profiles \
$spring_data \
--spring.email.host=smtp.gmail.com \
--spring.email.port=587 \
--spring.email.password=123456 \
--jhipster.mail.base-url=http://www.myinstallaton.com/ \
--application.path=$arcade_path \
--application.storage.path=$arcade_path/storage \
--application.connectorsPath=$arcade_path/arcade-connectors/ \
--ssh.priv.key=$arcade_path/.ssh/id.rsa \
--ssh.pub.key=$arcade_path/.ssh/id.rsa.pub