Hi
Currently, my application (app) is running in a VPS and now I want to deploy another instance, say UAT version within the same tomcat server but of course that UAT version will use it’s own database.
A. Here is the approach.
Rename the module prefix
change the database connections
B. Here is what I have done:
renamed the application prefix to appUat and used a separate database connection for this version.
If you want to build WAR files with specific database connection parameters, use the coreContextXmlPath parameter of the buildWar task. It allows you to specify a file which will go to the WAR instead of context.xml currently used in your dev environment.
I am considering following two files to use when appropriate:
prod-context.xml
uat-context.xml
Is it allowed that I keep 2 files in the same project and use one which is relevant for the instance I am deploying e.g. PROD and UAT? Is there any rule or naming convention for the war-context.xml file?
Of course you can have multiple files with different database properties.
I would recommend also creating separate tasks for using these files, e.g. the first task managed by Studio, it always has buildWar name, and the second you can just copy-paste and change the name, e.g.