aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-optimizer/src/main/docker/extra-files/startService.sh
blob: 7cbed3d57e3afca6803a4c2bd40cdfa07c5c10d4 (plain)
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
#!/bin/sh

AUTHENTICATION=${AUTHENTICATION:-proprietary-auth}

VM_ARGS="${VM_ARGS} -Dserver.local.startpath=${RESOURCES_HOME}"

if [ "${JAVA_TRUSTSTORE}" != '' ]
then
	VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStore=${JAVA_TRUSTSTORE}"
fi

if [ "${JAVA_TRUSTSTORE_PASSWORD}" != '' ]
then
	VM_ARGS="${VM_ARGS} -Djavax.net.ssl.trustStorePassword=${JAVA_TRUSTSTORE_PASSWORD}"
fi

if [ "${SSL_KEYSTORE}" != '' ]
then
	VM_ARGS="${VM_ARGS} -Dserver.ssl.key-store=${SSL_KEYSTORE}"
fi

if [ "${SSL_KEYSTORE_PASSWORD}" != '' ]
then
	VM_ARGS="${VM_ARGS} -Djavax.net.ssl.keyStorePassword=${SSL_KEYSTORE_PASSWORD}"
fi

echo "VM_ARGS="${VM_ARGS}

java -Djava.security.egd=file:/dev/./urandom  ${VM_ARGS} -Xms256m -Xmx1024m  -jar  ./app.jar --spring.profiles.active=${AUTHENTICATION}