Overview
Describes how to redeploy the mapping tool to the IHTSDO mapping.ihtsdotools.org server when the code has been updated.
Details
- Log into the server (mapping.ihtsdotools.org).
Get latest code:
cd ~/code git pull
Build all of the code, making sure to choose the correct "config.artifactId" for your environment. Shown is "prod" configuration:
cd ~/code mvn -Dconfig.artifactId=mapping-config-prod clean install
Stop tomcat and clear prior application builds (to avoid server-side caching):
# Stop the tomcat7 server service tomcat7 stop /bin/rm -rf /var/lib/tomcat7/work/Catalina/localhost/mapping-rest /bin/rm -rf /var/lib/tomcat7/webapps/mapping-rest /bin/rm -rf /var/lib/tomcat7/webapps/mapping-rest.war
Update the database if needed:
mvn clean install -Drun.config=~/config/config.properties -DUpdatedb -Dhibernate.hbm2ddl.auto=update
Deploy war files:
/bin/cp -f ~/code/rest/target/mapping-rest*war /var/lib/tomcat7/webapps/mapping-rest.war
Start service and link "doc" directory:
service tomcat7 start # wait for deploy to create the ROOT directory sleep 10 # link doc directory cd /var/lib/tomcat7/webapps/mapping-rest ln -s ~/data/doc
NOW, if deploying to PROD, create a github pull request.
References/Links
- n/a