aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/docker/startup.sh
blob: b2f2d5165550ebc4b17ab374d4b4a7a4333ffeb6 (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
#!/bin/sh

# adding support for https
HTTPS_ENABLED=${IS_HTTPS:-"false"}
CLIENT_AUTH=${IS_CLIENT_AUTH:-"false"}
if [ "$HTTPS_ENABLED" = "true" ]
then
    echo "enable ssl"

    java -jar "${JETTY_HOME}/start.jar" --add-to-start=https,ssl \
        jetty.sslContext.keyStorePath=$KEYSTORE_PATH \
        jetty.sslContext.keyStorePassword=$KEYSTORE_PASS \
	    jetty.sslContext.keyManagerPassword=$KEYSTORE_PASS \
        jetty.sslContext.trustStorePath=$TRUSTSTORE_PATH \
        jetty.sslContext.trustStorePassword=$TRUSTSTORE_PASS

    echo "setting SSL environment variable"

    SSL_JAVA_OPTS=" -DkeystorePath=$JETTY_BASE/$KEYSTORE_PATH -DkeystorePassword=$KEYSTORE_PASS -DkeyManagerPassword=$KEYSTORE_PASS -DtruststorePath=$JETTY_BASE/$KEYSTORE_PATH -DtruststorePassword=$TRUSTSTORE_PASS -DsslTrustAll=$TRUST_ALL"

    echo $SSL_JAVA_OPTS

else
    echo "no ssl required"
fi
java $JAVA_OPTIONS -DproxyTo=$BACKEND $SSL_JAVA_OPTS -jar $JETTY_HOME/start.jar