Make devportal one-docker ready
MODIFY
docker/start-nginx-with-devportal.sh
docker/start-nginx-with-devportal.sh
@@ -8,4 +8,15 @@ do
envsubst "\$KEYCLOAK_REALM \$API_MGMT_UI_REST_URL \$KEYCLOAK_AUTH_URL" < "$mainFileName" > main.tmp
mv main.tmp "${mainFileName}"
done
+
+# Check if a prefix is set
+if [ -z "$SYSTEM_PREFIX" ]
+then
+ # If no prefix start nginx
+ nginx -g 'daemon off;'
+else
+ # If a prefix is set we will replace the base path in index.html before starting tomcat
+ # Replace '/' with e.g. '/pas/devportal/'
+ sed -i "s/'\/'/'\/$SYSTEM_PREFIX\/devportal\/'/g" "/usr/share/nginx/html/index.html"
nginx -g 'daemon off;'
+fi

MODIFY
src/index.html
src/index.html
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Developer Portal</title>
- <base href="/">
+ <base href='/'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">

BPAAS-6301: Make devportal one-docker ready