Skip to content

Commit e73fc60

Browse files
committed
Cleanup
1 parent d76438e commit e73fc60

File tree

4 files changed

+112
-8
lines changed

4 files changed

+112
-8
lines changed

Diff for: core/Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ LABEL maintainer="Camptocamp <[email protected]>"
55

66
RUN --mount=type=cache,target=/var/cache,sharing=locked \
77
--mount=type=cache,target=/root/.cache \
8-
perl -0777 -i -pe 's/(<Valve className="org.apache.catalina.valves.AccessLogValve"[^>]*>)/<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true"\/>/s' "${CATALINA_HOME}/conf/server.xml" \
9-
&& echo "tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \
8+
echo "tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \
109
&& echo "org.apache.catalina.startup.TldConfig.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \
1110
&& echo "tomcat.util.scan.DefaultJarScanner.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \
12-
&& perl -0777 -i -pe 's/<\/Context>/<Resources cachingAllowed="true" cacheMaxSize="102400"\/><\/Context>/' "${CATALINA_HOME}/conf/context.xml" \
1311
&& mkdir --parent /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work/Catalina \
1412
&& chmod -R g+rwx /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work \
1513
&& chgrp -R root /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work \
@@ -24,7 +22,6 @@ COPY docker /
2422

2523
RUN mkdir -p "${CATALINA_HOME}/extlib/classes/org/mapfish/print" \
2624
&& cp -r "${CATALINA_HOME}/webapps/ROOT/WEB-INF/classes/org/mapfish/print/url" "${CATALINA_HOME}/extlib/classes/org/mapfish/print/" \
27-
&& perl -0777 -i -pe 's/<Valve className="ch.qos.logback.access.tomcat.LogbackValve" quiet="true"\/>//s' "${CATALINA_HOME}/conf/server.xml" \
2825
&& chmod g+r -R /usr/local/tomcat/conf/ \
2926
&& chmod g+rw /usr/local/tomcat/temp/ /usr/local/tomcat/webapps/ROOT/WEB-INF/lib \
3027
&& chmod g+rw /usr/local/tomcat/webapps/ROOT/WEB-INF/classes /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/*.xml \

Diff for: core/build.gradle

+7-4
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ dependencies {
142142
"org.springframework:spring-jdbc:5.3.39",
143143
"org.springframework:spring-tx:5.3.39",
144144
"org.springframework:spring-test:5.3.39",
145-
"javax.media:jai-core:1.1.3"
145+
"javax.media:jai-core:1.1.3",
146146
)
147147
metrics(
148148
"io.dropwizard.metrics:metrics-core:4.2.27",
@@ -171,13 +171,17 @@ dependencies {
171171
"net.sf.jasperreports:jasperreports-functions:6.21.3",
172172
'joda-time:joda-time:2.12.7'
173173
)
174+
implementation(
175+
"ch.qos.logback:logback-classic:1.5.7",
176+
"ch.qos.logback.access:common:2.0.1",
177+
"ch.qos.logback.access:tomcat:2.0.1",
178+
'net.logstash.logback:logstash-logback-encoder:8.0',
179+
)
174180
implementation(
175181
'com.google.guava:guava:33.0.0-jre',
176182
"org.slf4j:slf4j-api:2.0.16",
177183
"org.slf4j:jcl-over-slf4j:2.0.16",
178184
"org.slf4j:jul-to-slf4j:2.0.16",
179-
"ch.qos.logback:logback-classic:1.5.7",
180-
"ch.qos.logback:logback-access:1.4.14",
181185
'org.json:json:20240303',
182186
'org.yaml:snakeyaml:2.2',
183187
'com.github.spullara.cli-parser:cli-parser:1.1.6',
@@ -186,7 +190,6 @@ dependencies {
186190
'com.amazonaws:aws-java-sdk-s3:1.12.770',
187191
'com.adobe.xmp:xmpcore:6.1.11',
188192
'io.sentry:sentry-logback:7.5.0',
189-
'net.logstash.logback:logstash-logback-encoder:8.0',
190193
)
191194

192195
implementation(

Diff for: core/docker/usr/local/tomcat/conf/context.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- The contents of this file will be loaded for each web application -->
3+
<Context>
4+
<!-- Default set of monitored resources. If one of these changes, the -->
5+
<!-- web application will be reloaded. -->
6+
<WatchedResource>WEB-INF/web.xml</WatchedResource>
7+
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
8+
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
9+
10+
<Resources cachingAllowed="true" cacheMaxSize="102400"/>
11+
</Context>

Diff for: core/docker/usr/local/tomcat/conf/server.xml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Note: A "Server" is not itself a "Container", so you may not
3+
define subcomponents such as "Valves" at this level.
4+
Documentation at /docs/config/server.html
5+
-->
6+
<Server port="8005" shutdown="SHUTDOWN">
7+
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
8+
<!-- Security listener. Documentation at /docs/config/listeners.html
9+
<Listener className="org.apache.catalina.security.SecurityListener" />
10+
-->
11+
<!-- APR library loader. Documentation at /docs/apr.html -->
12+
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
13+
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
14+
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
15+
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
16+
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
17+
18+
<!-- Global JNDI resources
19+
Documentation at /docs/jndi-resources-howto.html
20+
-->
21+
<GlobalNamingResources>
22+
<!-- Editable user database that can also be used by
23+
UserDatabaseRealm to authenticate users
24+
-->
25+
<Resource name="UserDatabase" auth="Container"
26+
type="org.apache.catalina.UserDatabase"
27+
description="User database that can be updated and saved"
28+
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
29+
pathname="conf/tomcat-users.xml" />
30+
</GlobalNamingResources>
31+
32+
<!-- A "Service" is a collection of one or more "Connectors" that share
33+
a single "Container" Note: A "Service" is not itself a "Container",
34+
so you may not define subcomponents such as "Valves" at this level.
35+
Documentation at /docs/config/service.html
36+
-->
37+
<Service name="Catalina">
38+
39+
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
40+
<!--
41+
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
42+
maxThreads="150" minSpareThreads="4"/>
43+
-->
44+
45+
46+
<!-- A "Connector" represents an endpoint by which requests are received
47+
and responses are returned. Documentation at :
48+
Java HTTP Connector: /docs/config/http.html
49+
Java AJP Connector: /docs/config/ajp.html
50+
APR (HTTP/AJP) Connector: /docs/apr.html
51+
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
52+
-->
53+
<Connector port="8080" protocol="HTTP/1.1"
54+
connectionTimeout="20000"
55+
redirectPort="8443"
56+
maxParameterCount="1000"
57+
/>
58+
59+
<Engine name="Catalina" defaultHost="localhost">
60+
61+
<!--For clustering, please take a look at documentation at:
62+
/docs/cluster-howto.html (simple how to)
63+
/docs/config/cluster.html (reference documentation) -->
64+
<!--
65+
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
66+
-->
67+
68+
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
69+
via a brute-force attack -->
70+
<Realm className="org.apache.catalina.realm.LockOutRealm">
71+
<!-- This Realm uses the UserDatabase configured in the global JNDI
72+
resources under the key "UserDatabase". Any edits
73+
that are performed against this UserDatabase are immediately
74+
available for use by the Realm. -->
75+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
76+
resourceName="UserDatabase"/>
77+
</Realm>
78+
79+
<Host name="localhost" appBase="webapps"
80+
unpackWARs="true" autoDeploy="true">
81+
82+
<!-- SingleSignOn valve, share authentication between web applications
83+
Documentation at: /docs/config/valve.html -->
84+
<!--
85+
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
86+
-->
87+
88+
<Valve className="ch.qos.logback.access.tomcat.LogbackValve"/>
89+
90+
</Host>
91+
</Engine>
92+
</Service>
93+
</Server>

0 commit comments

Comments
 (0)