We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deacbbf commit b252172Copy full SHA for b252172
app.sh
@@ -1,6 +1,9 @@
1
#!/bin/bash
2
3
+set -x
4
+
5
PORT=${PORT:-8080}
6
+SSL_PORT=${SSL_PORT:-8443}
7
8
ARGS=""
9
@@ -9,6 +12,17 @@ ARGS="$ARGS --port $PORT"
12
ARGS="$ARGS --document-root htdocs"
10
13
ARGS="$ARGS --url-alias /media media"
11
14
15
+if [ -f /opt/app-root/cert/tls.key ]; then
16
+ ARGS="$ARGS --ssl-port $SSL_PORT"
17
+ ARGS="$ARGS --ssl-certificate /opt/app-root/cert/tls"
18
19
+ NAMESPACE=`cat /var/run/secrets/kubernetes.io/serviceaccount/namespace`
20
+ SERVICE=`echo $HOSTNAME | sed -e 's/^\(.*\)-[0-9]*-[a-z0-9]*$/\1/'`
21
22
+ ARGS="$ARGS --server-name $SERVICE.$NAMESPACE.svc"
23
+ ARGS="$ARGS --server-alias '*'"
24
+fi
25
26
if [ x"$MOD_WSGI_PROCESSES" != x"" ]; then
27
ARGS="$ARGS --processes $MOD_WSGI_PROCESSES"
28
fi
0 commit comments