Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5edb668d24 | ||
|
|
d2a33a028d |
+44
-15
@@ -1,32 +1,61 @@
|
|||||||
|
|
||||||
FROM ubuntu:${ubuntu.version}
|
FROM ubuntu:${ubuntu.version}
|
||||||
|
|
||||||
RUN apt update
|
# Configure the Apache Tomcat Catalina script
|
||||||
RUN apt -y install openjdk-${java.majorVersion}-jdk
|
|
||||||
RUN apt -y install tomcat${tomcat.majorVersion}
|
|
||||||
|
|
||||||
ENV JAVA_MEMORY_INIT=128m
|
ENV JAVA_MEMORY_INIT=128m
|
||||||
ENV JAVA_MEMORY_MAX=512m
|
ENV JAVA_MEMORY_MAX=512m
|
||||||
ENV JAVA_HOME="/usr/lib/jvm/java-${java.majorVersion}-openjdk-amd64"
|
ENV JAVA_HOME="/usr/local/lib/jvm/java-openjdk-dcevm"
|
||||||
ENV CATALINA_HOME="/usr/share/tomcat${tomcat.majorVersion}"
|
ENV CATALINA_HOME="/usr/local/share/tomcat"
|
||||||
ENV CATALINA_BASE="/var/lib/tomcat${tomcat.majorVersion}"
|
ENV CATALINA_BASE="/var/lib/tomcat"
|
||||||
ENV CATALINA_OPTS=
|
ENV CATALINA_OPTS=
|
||||||
|
|
||||||
ADD docker-entrypoint.sh /usr/local/bin
|
# Install curl
|
||||||
|
RUN apt update && apt -y install curl
|
||||||
|
|
||||||
# This will give us dynamic injection points into the running webapps
|
# Download & Install DCEVM Java
|
||||||
COPY tomcat-context.xml /etc/tomcat${tomcat.majorVersion}/context.xml
|
RUN mkdir -p /usr/local/lib/jvm && \
|
||||||
|
curl -L https://github.com/TravaOpenJDK/trava-jdk-${dcevm.majorVersion}-dcevm/releases/download/dcevm-${dcevm.version}/java${dcevm.majorVersion}-openjdk-dcevm-linux.tar.gz -o /usr/local/lib/jvm/java-openjdk-dcevm.tar.gz && \
|
||||||
|
cd /usr/local/lib/jvm && tar xzvf java-openjdk-dcevm.tar.gz && mv dcevm-${dcevm.version} java-openjdk-dcevm && rm java-openjdk-dcevm.tar.gz
|
||||||
|
|
||||||
# We need to create all possible mapped directories
|
# Download Hotswap Agent
|
||||||
RUN cd /var/lib/tomcat${tomcat.majorVersion} && \
|
RUN curl -L https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-${hotswap.version}/hotswap-agent-${hotswap.version}.jar -o /usr/local/lib/jvm/hotswap-agent.jar
|
||||||
rm -rf webapps/ROOT* && \
|
|
||||||
mkdir dev && cd dev && \
|
# Download & Install Apache Tomcat
|
||||||
|
RUN mkdir -p /usr/local/share && \
|
||||||
|
curl -L ${tomcat.mirror.baseUrl}/tomcat-${tomcat.majorVersion}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz -o /usr/local/share/apache-tomcat.tar.gz && \
|
||||||
|
cd /usr/local/share && tar xzvf apache-tomcat.tar.gz && mv apache-tomcat-${tomcat.version} tomcat && rm apache-tomcat.tar.gz
|
||||||
|
|
||||||
|
# Split Catalina Home & Base
|
||||||
|
RUN cd /usr/local/share/tomcat && \
|
||||||
|
mv webapps webapps.ignore && \
|
||||||
|
mkdir -p /var/lib/tomcat/webapps /var/lib/tomcat/lib /var/lib/tomcat/dev && \
|
||||||
|
mv conf work temp logs /var/lib/tomcat
|
||||||
|
|
||||||
|
# Add directories for dynamic injection points
|
||||||
|
RUN cd /var/lib/tomcat/dev && \
|
||||||
mkdir classes classes-extra1 classes-extra2 classes-extra3 classes-extra4 classes-extra5 classes-extra6 classes-extra7 && \
|
mkdir classes classes-extra1 classes-extra2 classes-extra3 classes-extra4 classes-extra5 classes-extra6 classes-extra7 && \
|
||||||
mkdir lib lib-extra1 lib-extra2 lib-extra3 lib-extra4 lib-extra5 lib-extra6 lib-extra7 && \
|
mkdir lib lib-extra1 lib-extra2 lib-extra3 lib-extra4 lib-extra5 lib-extra6 lib-extra7 && \
|
||||||
mkdir web web-extra1 web-extra2 web-extra3 web-extra4 web-extra5 web-extra6 web-extra7
|
mkdir web web-extra1 web-extra2 web-extra3 web-extra4 web-extra5 web-extra6 web-extra7
|
||||||
|
|
||||||
|
# Add our Docker container initialization script
|
||||||
|
ADD docker-entrypoint.sh /usr/local/bin
|
||||||
|
|
||||||
|
# Add our Apache Tomcat configuration
|
||||||
|
# This gives us dynamic injection points into the running webapps
|
||||||
|
COPY tomcat-context.xml /var/lib/tomcat/conf/context.xml
|
||||||
|
ADD hotswap-agent.properties /var/lib/tomcat/lib
|
||||||
|
|
||||||
|
# Listening for HTTP (not HTTPS) traffic
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# Listening for Java debugger traffic
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Running as ROOT user for now
|
||||||
|
#USER tomcat
|
||||||
|
|
||||||
|
# Execute the Docker container initialization script
|
||||||
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
|
||||||
CMD [ "/usr/share/tomcat${tomcat.majorVersion}/bin/catalina.sh", "run" ]
|
|
||||||
|
# Start the Apache Tomcat web container using the Catalina script
|
||||||
|
CMD [ "/usr/local/share/tomcat/bin/catalina.sh", "run" ]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CATALINA_OPTS="-Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX} -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n $CATALINA_OPTS"
|
CATALINA_OPTS="-Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX} -XX:HotswapAgent=external -javaagent:/usr/local/lib/jvm/hotswap-agent.jar -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n $CATALINA_OPTS"
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# This may be useful for example in multi module maven project to load class changes from upstream project
|
# This may be useful for example in multi module maven project to load class changes from upstream project
|
||||||
# classes. Set extraClasspath to upstream project compiler output and .class file will have precedence to
|
# classes. Set extraClasspath to upstream project compiler output and .class file will have precedence to
|
||||||
# classes from built JAR file.
|
# classes from built JAR file.
|
||||||
extraClasspath=/var/lib/tomcat9/dev/classes
|
extraClasspath=/var/lib/tomcat/dev/classes
|
||||||
|
|
||||||
# Watch for changes in a directory (resources only). If not set, changes of resources won't be observed.
|
# Watch for changes in a directory (resources only). If not set, changes of resources won't be observed.
|
||||||
#
|
#
|
||||||
@@ -19,19 +19,19 @@ extraClasspath=/var/lib/tomcat9/dev/classes
|
|||||||
# replacements of resources in a building step (maven filtering resource option).
|
# replacements of resources in a building step (maven filtering resource option).
|
||||||
# This setting will leave i.e. src/target/classes as default source for resources, but after the resource is modified
|
# This setting will leave i.e. src/target/classes as default source for resources, but after the resource is modified
|
||||||
# in src/main/resources, the new changed resource is served instead.
|
# in src/main/resources, the new changed resource is served instead.
|
||||||
watchResources=
|
watchResources=/var/lib/tomcat/dev/classes
|
||||||
|
|
||||||
# Load static web resources from different directory.
|
# Load static web resources from different directory.
|
||||||
#
|
#
|
||||||
# This setting is dependent on application server plugin(Jetty, Tomcat, ...).
|
# This setting is dependent on application server plugin(Jetty, Tomcat, ...).
|
||||||
# Jboss and Glassfish are not yet supported.
|
# Jboss and Glassfish are not yet supported.
|
||||||
# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
|
# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
|
||||||
webappDir=
|
webappDir=/var/lib/tomcat/dev/web
|
||||||
|
|
||||||
|
|
||||||
# Comma separated list of disabled plugins
|
# Comma separated list of disabled plugins
|
||||||
# Use plugin name - e.g. Hibernate, Spring, ZK, Hotswapper, AnonymousClassPatch, Tomcat, Logback ....
|
# Use plugin name - e.g. Hibernate, Spring, ZK, Hotswapper, AnonymousClassPatch, Tomcat, Logback ....
|
||||||
disabledPlugins=
|
disabledPlugins=Hibernate
|
||||||
|
|
||||||
# Watch for changed class files on watchResources path and reload class definition in the running application.
|
# Watch for changed class files on watchResources path and reload class definition in the running application.
|
||||||
#
|
#
|
||||||
@@ -54,7 +54,7 @@ autoHotswap=true
|
|||||||
#
|
#
|
||||||
# You need to specify JPDA port at startup
|
# You need to specify JPDA port at startup
|
||||||
# <pre>java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000</pre>
|
# <pre>java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000</pre>
|
||||||
# autoHotswap.port=8000
|
autoHotswap.port=8000
|
||||||
|
|
||||||
# Enables debugging in OsgiEquinox
|
# Enables debugging in OsgiEquinox
|
||||||
# osgiEquinox.debugMode=true
|
# osgiEquinox.debugMode=true
|
||||||
|
|||||||
@@ -3,14 +3,32 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
<artifactId>tomcat-rad</artifactId>
|
<artifactId>tomcat-rad</artifactId>
|
||||||
<version>9-1.1</version>
|
<version>9-1.2</version>
|
||||||
<name>Apache Tomcat for Rapid Application Development</name>
|
<name>Apache Tomcat for Rapid Application Development</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<!-- The release version of Ubuntu to use as the base -->
|
||||||
|
<!-- See: https://hub.docker.com/_/ubuntu -->
|
||||||
|
<!-- This has very little impact and may be replaced -->
|
||||||
<ubuntu.version>20.04</ubuntu.version>
|
<ubuntu.version>20.04</ubuntu.version>
|
||||||
<java.majorVersion>11</java.majorVersion>
|
|
||||||
|
<!-- The version of Java DCEVM to use for executing Apache Tomcat -->
|
||||||
|
<!-- See: https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/releases -->
|
||||||
|
<dcevm.version>11.0.10+4</dcevm.version>
|
||||||
|
<dcevm.majorVersion>11</dcevm.majorVersion>
|
||||||
|
|
||||||
|
<!-- The version of Apache Tomcat to serve as the basis of this Docker image -->
|
||||||
|
<!-- See: https://tomcat.apache.org/download-90.cgi -->
|
||||||
|
<tomcat.version>9.0.44</tomcat.version>
|
||||||
<tomcat.majorVersion>9</tomcat.majorVersion>
|
<tomcat.majorVersion>9</tomcat.majorVersion>
|
||||||
|
<tomcat.mirror.baseUrl>https://apache.osuosl.org/tomcat</tomcat.mirror.baseUrl>
|
||||||
|
|
||||||
|
<!-- The version of the Hotswap Agent to use -->
|
||||||
|
<!-- See: https://github.com/HotswapProjects/HotswapAgent/releases -->
|
||||||
|
<hotswap.version>1.4.1</hotswap.version>
|
||||||
|
|
||||||
|
<!-- The Docker image meta-data for pushing the build -->
|
||||||
<image.name>inteligr8/${project.artifactId}</image.name>
|
<image.name>inteligr8/${project.artifactId}</image.name>
|
||||||
<image.tag>${project.version}</image.tag>
|
<image.tag>${project.version}</image.tag>
|
||||||
<image.registry>docker.inteligr8.com</image.registry>
|
<image.registry>docker.inteligr8.com</image.registry>
|
||||||
@@ -18,6 +36,7 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<!-- This plugin build and pushes the Docker image -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.fabric8</groupId>
|
<groupId>io.fabric8</groupId>
|
||||||
<artifactId>fabric8-maven-plugin</artifactId>
|
<artifactId>fabric8-maven-plugin</artifactId>
|
||||||
@@ -30,13 +49,17 @@
|
|||||||
</image>
|
</image>
|
||||||
</images>
|
</images>
|
||||||
<contextDir>${basedir}</contextDir>
|
<contextDir>${basedir}</contextDir>
|
||||||
|
<buildStrategy>docker</buildStrategy>
|
||||||
|
<verbose>true</verbose>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
|
<!-- This execution builds the Docker image -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>docker-build</id>
|
<id>docker-build</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals><goal>build</goal></goals>
|
<goals><goal>build</goal></goals>
|
||||||
</execution>
|
</execution>
|
||||||
|
<!-- This execution pushes the built Docker image to the configured Docker Registry -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>docker-push</id>
|
<id>docker-push</id>
|
||||||
<phase>deploy</phase>
|
<phase>deploy</phase>
|
||||||
@@ -44,8 +67,10 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- This plugin prevents the project from deploying to the Maven Repository, as it is pointless -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -55,10 +80,9 @@
|
|||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>use-local-docker</id>
|
<id>no-docker</id>
|
||||||
<properties>
|
<properties>
|
||||||
<fabric8.build.jib>false</fabric8.build.jib>
|
<fabric8.build.jib>true</fabric8.build.jib>
|
||||||
<fabric8.build.strategy>docker</fabric8.build.strategy>
|
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|||||||
+25
-25
@@ -16,7 +16,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<!-- The contents of this file will be loaded for each web application -->
|
<!-- The contents of this file will be loaded for each web application -->
|
||||||
<Context reloadable="true">
|
<Context reloadable="false">
|
||||||
|
|
||||||
<!-- Default set of monitored resources. If one of these changes, the -->
|
<!-- Default set of monitored resources. If one of these changes, the -->
|
||||||
<!-- web application will be reloaded. -->
|
<!-- web application will be reloaded. -->
|
||||||
@@ -32,31 +32,31 @@
|
|||||||
|
|
||||||
<Resources cachingAllowed="false">
|
<Resources cachingAllowed="false">
|
||||||
<!-- Injection points for classpath -->
|
<!-- Injection points for classpath -->
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/classes-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
<PreResources base="/var/lib/tomcat/dev/classes-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/classes" />
|
||||||
<!-- Injection point for JARs -->
|
<!-- Injection point for JARs -->
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/lib-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
<PreResources base="/var/lib/tomcat/dev/lib-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/WEB-INF/lib" />
|
||||||
<!-- Injection points for web -->
|
<!-- Injection points for web -->
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra1" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra2" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra3" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra4" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra5" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra6" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
<PreResources base="/var/lib/tomcat9/dev/web-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
<PreResources base="/var/lib/tomcat/dev/web-extra7" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/" />
|
||||||
</Resources>
|
</Resources>
|
||||||
</Context>
|
</Context>
|
||||||
|
|||||||
@@ -1,171 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
contributor license agreements. See the NOTICE file distributed with
|
|
||||||
this work for additional information regarding copyright ownership.
|
|
||||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
||||||
(the "License"); you may not use this file except in compliance with
|
|
||||||
the License. You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
<!-- Note: A "Server" is not itself a "Container", so you may not
|
|
||||||
define subcomponents such as "Valves" at this level.
|
|
||||||
Documentation at /docs/config/server.html
|
|
||||||
-->
|
|
||||||
<Server port="-1" shutdown="SHUTDOWN">
|
|
||||||
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
|
|
||||||
<!-- Security listener. Documentation at /docs/config/listeners.html
|
|
||||||
<Listener className="org.apache.catalina.security.SecurityListener" />
|
|
||||||
-->
|
|
||||||
<!--APR library loader. Documentation at /docs/apr.html -->
|
|
||||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
|
||||||
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
|
|
||||||
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
|
||||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
|
||||||
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
|
||||||
|
|
||||||
<!-- Global JNDI resources
|
|
||||||
Documentation at /docs/jndi-resources-howto.html
|
|
||||||
-->
|
|
||||||
<GlobalNamingResources>
|
|
||||||
<!-- Editable user database that can also be used by
|
|
||||||
UserDatabaseRealm to authenticate users
|
|
||||||
-->
|
|
||||||
<Resource name="UserDatabase" auth="Container"
|
|
||||||
type="org.apache.catalina.UserDatabase"
|
|
||||||
description="User database that can be updated and saved"
|
|
||||||
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
|
||||||
pathname="conf/tomcat-users.xml" />
|
|
||||||
</GlobalNamingResources>
|
|
||||||
|
|
||||||
<!-- A "Service" is a collection of one or more "Connectors" that share
|
|
||||||
a single "Container" Note: A "Service" is not itself a "Container",
|
|
||||||
so you may not define subcomponents such as "Valves" at this level.
|
|
||||||
Documentation at /docs/config/service.html
|
|
||||||
-->
|
|
||||||
<Service name="Catalina">
|
|
||||||
|
|
||||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
|
||||||
<!--
|
|
||||||
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
|
||||||
maxThreads="150" minSpareThreads="4"/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- A "Connector" represents an endpoint by which requests are received
|
|
||||||
and responses are returned. Documentation at :
|
|
||||||
Java HTTP Connector: /docs/config/http.html
|
|
||||||
Java AJP Connector: /docs/config/ajp.html
|
|
||||||
APR (HTTP/AJP) Connector: /docs/apr.html
|
|
||||||
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
|
|
||||||
-->
|
|
||||||
<Connector port="8080" protocol="HTTP/1.1"
|
|
||||||
connectionTimeout="20000"
|
|
||||||
redirectPort="8443" />
|
|
||||||
<!-- A "Connector" using the shared thread pool-->
|
|
||||||
<!--
|
|
||||||
<Connector executor="tomcatThreadPool"
|
|
||||||
port="8080" protocol="HTTP/1.1"
|
|
||||||
connectionTimeout="20000"
|
|
||||||
redirectPort="8443" />
|
|
||||||
-->
|
|
||||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443
|
|
||||||
This connector uses the NIO implementation. The default
|
|
||||||
SSLImplementation will depend on the presence of the APR/native
|
|
||||||
library and the useOpenSSL attribute of the
|
|
||||||
AprLifecycleListener.
|
|
||||||
Either JSSE or OpenSSL style configuration may be used regardless of
|
|
||||||
the SSLImplementation selected. JSSE style configuration is used below.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
|
||||||
maxThreads="150" SSLEnabled="true">
|
|
||||||
<SSLHostConfig>
|
|
||||||
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
|
|
||||||
type="RSA" />
|
|
||||||
</SSLHostConfig>
|
|
||||||
</Connector>
|
|
||||||
-->
|
|
||||||
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
|
|
||||||
This connector uses the APR/native implementation which always uses
|
|
||||||
OpenSSL for TLS.
|
|
||||||
Either JSSE or OpenSSL style configuration may be used. OpenSSL style
|
|
||||||
configuration is used below.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
|
|
||||||
maxThreads="150" SSLEnabled="true" >
|
|
||||||
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
|
|
||||||
<SSLHostConfig>
|
|
||||||
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
|
|
||||||
certificateFile="conf/localhost-rsa-cert.pem"
|
|
||||||
certificateChainFile="conf/localhost-rsa-chain.pem"
|
|
||||||
type="RSA" />
|
|
||||||
</SSLHostConfig>
|
|
||||||
</Connector>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Define an AJP 1.3 Connector on port 8009 -->
|
|
||||||
<!--
|
|
||||||
<Connector protocol="AJP/1.3"
|
|
||||||
address="::1"
|
|
||||||
port="8009"
|
|
||||||
redirectPort="8443" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
|
||||||
every request. The Engine implementation for Tomcat stand alone
|
|
||||||
analyzes the HTTP headers included with the request, and passes them
|
|
||||||
on to the appropriate Host (virtual host).
|
|
||||||
Documentation at /docs/config/engine.html -->
|
|
||||||
|
|
||||||
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
|
||||||
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
|
||||||
-->
|
|
||||||
<Engine name="Catalina" defaultHost="localhost">
|
|
||||||
|
|
||||||
<!--For clustering, please take a look at documentation at:
|
|
||||||
/docs/cluster-howto.html (simple how to)
|
|
||||||
/docs/config/cluster.html (reference documentation) -->
|
|
||||||
<!--
|
|
||||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
|
|
||||||
via a brute-force attack -->
|
|
||||||
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
|
||||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
|
||||||
resources under the key "UserDatabase". Any edits
|
|
||||||
that are performed against this UserDatabase are immediately
|
|
||||||
available for use by the Realm. -->
|
|
||||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
|
||||||
resourceName="UserDatabase"/>
|
|
||||||
</Realm>
|
|
||||||
|
|
||||||
<Host name="localhost" appBase="webapps"
|
|
||||||
unpackWARs="true" autoDeploy="true">
|
|
||||||
|
|
||||||
<!-- SingleSignOn valve, share authentication between web applications
|
|
||||||
Documentation at: /docs/config/valve.html -->
|
|
||||||
<!--
|
|
||||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Access log processes all example.
|
|
||||||
Documentation at: /docs/config/valve.html
|
|
||||||
Note: The pattern used is equivalent to using pattern="common" -->
|
|
||||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
|
||||||
prefix="localhost_access_log" suffix=".txt"
|
|
||||||
pattern="%h %l %u %t "%r" %s %b" />
|
|
||||||
|
|
||||||
</Host>
|
|
||||||
</Engine>
|
|
||||||
</Service>
|
|
||||||
</Server>
|
|
||||||
Reference in New Issue
Block a user