forked from camunda/docker-camunda-bpm-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcamunda-tomcat.sh
executable file
·38 lines (32 loc) · 1.05 KB
/
camunda-tomcat.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
#!/bin/bash -eu
XML_JDBC="//Resource[@name='jdbc/ProcessEngine']"
XML_DRIVER="${XML_JDBC}/@driverClassName"
XML_URL="${XML_JDBC}/@url"
XML_USERNAME="${XML_JDBC}/@username"
XML_PASSWORD="${XML_JDBC}/@password"
XML_MAXACTIVE="${XML_JDBC}/@maxActive"
XML_MINIDLE="${XML_JDBC}/@minIdle"
XML_MAXIDLE="${XML_JDBC}/@maxIdle"
if [ -z "$SKIP_DB_CONFIG" ]; then
echo "Configure database"
xmlstarlet ed -L \
-u "${XML_DRIVER}" -v "${DB_DRIVER}" \
-u "${XML_URL}" -v "${DB_URL}" \
-u "${XML_USERNAME}" -v "${DB_USERNAME}" \
-u "${XML_PASSWORD}" -v "${DB_PASSWORD}" \
-u "${XML_MAXACTIVE}" -v "${DB_CONN_MAXACTIVE}" \
-u "${XML_MINIDLE}" -v "${DB_CONN_MINIDLE}" \
-u "${XML_MAXIDLE}" -v "${DB_CONN_MAXIDLE}" \
/camunda/conf/server.xml
fi
CMD="/camunda/bin/catalina.sh"
if [ "${DEBUG}" = "true" ]; then
echo "Enabling debug mode, JPDA accesible under port 8000"
export JPDA_ADDRESS="0.0.0.0:8000"
CMD+=" jpda"
fi
CMD+=" run"
if [ -n "${WAIT_FOR}" ]; then
CMD="wait-for-it.sh ${WAIT_FOR} -s -t ${WAIT_FOR_TIMEOUT} -- ${CMD}"
fi
exec ${CMD}