Suggestr Setup - tsgrp/HPI GitHub Wiki
After a database has been successfully setup (refer to Derby DB Setup if that has not been completed) we can then setup SuggestR.
To run SuggestR, a separate Tomcat is needed. Download Tomcat 8+, then go to [TOMCAT_HOME]/conf
and open server.xml
. There should be three tags in there that refer to ports:
Server port="8005"
Connector port="8080"
Connector port="8009"
Change all of these ports to use something other than the Tomcat that is running OpenContent, OCMS, etc. Note the port that 8080
is changed to.
After you are given the Git link by someone, login to Git. To download SuggestR:
- Click the
Clone
button near the top right. Copy the link that is in the text boxClone With HTTPS
(the link ends in.git
). - Open up a CMD prompt in the location that the SuggestR code will go or put the full path in the command below.
- Run this command to clone the repository:
git clone [GIT_LINK] [/PATH/BRANCH_NAME]
- Go to the
[SUGGESTR_GIT_REPO_HOME]/src/main/resources
folder. Open theapplication.yml
file within this folder. Theport:
underserver:
should be the SuggestR Tomcat port from the section above. - In the same file, ensure the
datasource
information is the same as the information when Derby DB started or the other DB that is setup.
- Create a file called
build-[HOSTNAME].properties
where HOSTNAME is the name of the computer it is being built on. - In this file, set the
tomcatHome=
variable to the Tomcat SuggestR is on. - On the same level as the computer build properties files, run the command
gradle clean bootWar
which will build and deploy the war to the Tomcat. - Startup the Tomcat.
The only configuration property that needs to be set is suggestr.url.root=http://[HOST]:[PORT]/SuggestR
. Where the port needs to be the one that 8080
was changed to when the separate SuggestR Tomcat was setup.