How to deploy only selective webapps out of many webapps available in tomcat/webapps

40 views Asked by At

I have ui and backend webapps placed under tomcat/webapps folder. I am separating them out, for ex- if the node type chosen as backend i don't want to deploy the ui webapps at backend node and vice versa. Currently this is handled via different server xml and they are controlled through a flag in deployment yaml.

For backend node type, server-backend.xml looks like below

<Host appBase="webapps" deployOnStartup="false" autoDeploy="false" name="localhost" unpackWARs="true">
  <Context path="/app1" swallowOutput="true">
      <Resource name="R1" />
      <Resource name="R2" />
 </Context>
<Context path="/app2" swallowOutput="true">
      <Resource name="R1" />
      <Resource name="R2" />
 </Context>
</Host>

Instead of injecting app context xml content in server.xml, I want to provide the location of app1.xml/app2.xml which are residing in conf/Catalina/localhost/app1.xml or conf/Catalina/localhost/app2.xml.

0

There are 0 answers