Change base path and startup script
MODIFY
docker/start-nginx-with-devportal.sh
docker/start-nginx-with-devportal.sh
@@ -9,14 +9,12 @@ do
mv main.tmp "${mainFileName}"
done
-# Check if a prefix is set
-if [ -z "$SYSTEM_PREFIX" ]
+# Check if a prefix exists
+if [ -n "$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;'
+ # If a prefix is set we will replace the base path in index.html before starting the application
+ # Replace "/" with e.g. "/pas/devportal/"
+ sed -i "s/\"\/\"/\"\/$SYSTEM_PREFIX\/devportal\/\"/g" "/usr/share/nginx/html/index.html"
fi
+# start nginx
+nginx -g 'daemon off;'

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">

GW-385: Change base path and startup script