From e73fc60c9cbbed9e924abfe6e66d03971240c36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 26 Sep 2024 17:55:02 +0200 Subject: [PATCH 1/5] Cleanup --- core/Dockerfile | 5 +- core/build.gradle | 11 ++- core/docker/usr/local/tomcat/conf/context.xml | 11 +++ core/docker/usr/local/tomcat/conf/server.xml | 93 +++++++++++++++++++ 4 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 core/docker/usr/local/tomcat/conf/context.xml create mode 100644 core/docker/usr/local/tomcat/conf/server.xml diff --git a/core/Dockerfile b/core/Dockerfile index 71efb0e5ba..6fd9324b8d 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -5,11 +5,9 @@ LABEL maintainer="Camptocamp " RUN --mount=type=cache,target=/var/cache,sharing=locked \ --mount=type=cache,target=/root/.cache \ - perl -0777 -i -pe 's/(]*>)//s' "${CATALINA_HOME}/conf/server.xml" \ - && echo "tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \ + echo "tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \ && echo "org.apache.catalina.startup.TldConfig.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \ && echo "tomcat.util.scan.DefaultJarScanner.jarsToSkip=*" >> "${CATALINA_HOME}/conf/catalina.properties" \ - && perl -0777 -i -pe 's/<\/Context>/<\/Context>/' "${CATALINA_HOME}/conf/context.xml" \ && mkdir --parent /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work/Catalina \ && chmod -R g+rwx /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work \ && chgrp -R root /usr/local/tomcat/conf/Catalina /usr/local/tomcat/work \ @@ -24,7 +22,6 @@ COPY docker / RUN mkdir -p "${CATALINA_HOME}/extlib/classes/org/mapfish/print" \ && cp -r "${CATALINA_HOME}/webapps/ROOT/WEB-INF/classes/org/mapfish/print/url" "${CATALINA_HOME}/extlib/classes/org/mapfish/print/" \ - && perl -0777 -i -pe 's///s' "${CATALINA_HOME}/conf/server.xml" \ && chmod g+r -R /usr/local/tomcat/conf/ \ && chmod g+rw /usr/local/tomcat/temp/ /usr/local/tomcat/webapps/ROOT/WEB-INF/lib \ && chmod g+rw /usr/local/tomcat/webapps/ROOT/WEB-INF/classes /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/*.xml \ diff --git a/core/build.gradle b/core/build.gradle index 1cd66a7f5e..3199fa69b7 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -142,7 +142,7 @@ dependencies { "org.springframework:spring-jdbc:5.3.39", "org.springframework:spring-tx:5.3.39", "org.springframework:spring-test:5.3.39", - "javax.media:jai-core:1.1.3" + "javax.media:jai-core:1.1.3", ) metrics( "io.dropwizard.metrics:metrics-core:4.2.27", @@ -171,13 +171,17 @@ dependencies { "net.sf.jasperreports:jasperreports-functions:6.21.3", 'joda-time:joda-time:2.12.7' ) + implementation( + "ch.qos.logback:logback-classic:1.5.7", + "ch.qos.logback.access:common:2.0.1", + "ch.qos.logback.access:tomcat:2.0.1", + 'net.logstash.logback:logstash-logback-encoder:8.0', + ) implementation( 'com.google.guava:guava:33.0.0-jre', "org.slf4j:slf4j-api:2.0.16", "org.slf4j:jcl-over-slf4j:2.0.16", "org.slf4j:jul-to-slf4j:2.0.16", - "ch.qos.logback:logback-classic:1.5.7", - "ch.qos.logback:logback-access:1.4.14", 'org.json:json:20240303', 'org.yaml:snakeyaml:2.2', 'com.github.spullara.cli-parser:cli-parser:1.1.6', @@ -186,7 +190,6 @@ dependencies { 'com.amazonaws:aws-java-sdk-s3:1.12.770', 'com.adobe.xmp:xmpcore:6.1.11', 'io.sentry:sentry-logback:7.5.0', - 'net.logstash.logback:logstash-logback-encoder:8.0', ) implementation( diff --git a/core/docker/usr/local/tomcat/conf/context.xml b/core/docker/usr/local/tomcat/conf/context.xml new file mode 100644 index 0000000000..5f8594e48b --- /dev/null +++ b/core/docker/usr/local/tomcat/conf/context.xml @@ -0,0 +1,11 @@ + + + + + + WEB-INF/web.xml + WEB-INF/tomcat-web.xml + ${catalina.base}/conf/web.xml + + + diff --git a/core/docker/usr/local/tomcat/conf/server.xml b/core/docker/usr/local/tomcat/conf/server.xml new file mode 100644 index 0000000000..ccf0696b8d --- /dev/null +++ b/core/docker/usr/local/tomcat/conf/server.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1127d7fb59729771dcfa85f86f27cb7ce58bd08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 26 Sep 2024 21:28:59 +0200 Subject: [PATCH 2/5] f --- core/docker/usr/local/tomcat/conf/server.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/docker/usr/local/tomcat/conf/server.xml b/core/docker/usr/local/tomcat/conf/server.xml index ccf0696b8d..9ab652fa98 100644 --- a/core/docker/usr/local/tomcat/conf/server.xml +++ b/core/docker/usr/local/tomcat/conf/server.xml @@ -8,8 +8,10 @@ - - + + + + From c56b176fbf202a3adbb625ba2b2f3118ac94bcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 26 Sep 2024 22:37:32 +0200 Subject: [PATCH 3/5] try --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index e3a14d0db8..e29308ffb4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,6 +8,7 @@ services: print: image: mapfish_print_tester user: ${USER_ID} + hostname: print volumes: - ./examples/src/test/resources/examples:/usr/local/tomcat/webapps/ROOT/print-apps:ro ports: From faaf882bbbf1ae9411488e62ce49a111d49b308c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 27 Sep 2024 08:27:17 +0200 Subject: [PATCH 4/5] f --- core/docker/usr/local/tomcat/bin/docker-start-print | 1 + docker-compose.yaml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/docker/usr/local/tomcat/bin/docker-start-print b/core/docker/usr/local/tomcat/bin/docker-start-print index f96c53fa65..8e8797451d 100755 --- a/core/docker/usr/local/tomcat/bin/docker-start-print +++ b/core/docker/usr/local/tomcat/bin/docker-start-print @@ -18,4 +18,5 @@ fi mkdir -p print-apps rm -f /usr/local/tomcat/temp/mapfish-print/ROOT/stop /usr/local/tomcat/temp/mapfish-print/ROOT/stopped +echo "Start Catalina" exec catalina.sh run diff --git a/docker-compose.yaml b/docker-compose.yaml index e29308ffb4..e3a14d0db8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,6 @@ services: print: image: mapfish_print_tester user: ${USER_ID} - hostname: print volumes: - ./examples/src/test/resources/examples:/usr/local/tomcat/webapps/ROOT/print-apps:ro ports: From 2e64c325b86b92ffe03e58f79fdd9b996b090efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 27 Sep 2024 08:37:28 +0200 Subject: [PATCH 5/5] try --- core/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index 3199fa69b7..276cd602ae 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -173,8 +173,7 @@ dependencies { ) implementation( "ch.qos.logback:logback-classic:1.5.7", - "ch.qos.logback.access:common:2.0.1", - "ch.qos.logback.access:tomcat:2.0.1", + "ch.qos.logback:logback-access:1.4.14", 'net.logstash.logback:logstash-logback-encoder:8.0', ) implementation(