After playing with install scripts, I was finally able to install services with domain URL containing context path. To help others with similar requirement, I am writing the steps to install service with a custom URL:
- When services are installed as a window service:
Following changes required in installService.ps1
-Add spring boot variables to pass as a parameter while installing services.
#Spring boot properties to add to install on domain url containg context path
$serverContextUrl="--server.contextPath=/sdl"
$serverAddress="--server.address=www.mydoamin.com"
-Pass context path as a start parameters.
$arguments += "++StartParams=" + $serverContextUrl
- When services are installed as a standalone Windows process
Following changes required in start.ps1
-Add spring boot variables to pass as a parameter while installing services.
#Spring boot properties to add to install on domain url containg context path
$serverContextUrl="--server.contextPath=/sdl"
$serverAddress="--server.address=www.mydoamin.com"
-Include above parameter in arguments.
$arguments+=$serverContextUrl
$arguments+=$serverAddress
Similar changes are required in start.sh script file in case we need to install services on Unix machine.