From 485d2c2915283c81a66ad78b6ffbb7d5bed75804 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 29 Jul 2024 17:02:22 +0200 Subject: [PATCH 1/3] allow adding extra jars to Tomcat lib folder (e.g jdbc drivers) --- repository/Dockerfile | 6 +++--- repository/artifacts.json | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/repository/Dockerfile b/repository/Dockerfile index b3c4d049..ab1a63ed 100644 --- a/repository/Dockerfile +++ b/repository/Dockerfile @@ -17,7 +17,6 @@ RUN mkdir -m 750 -p ${CATALINA_HOME}/shared/classes/alfresco/extension/keystore/ RUN mkdir -m 770 ${CATALINA_HOME}/alf_data/ RUN unzip ${DISTDIR}/web-server/webapps/alfresco.war -d ${CATALINA_HOME}/webapps/alfresco/ RUN cp -a ${DISTDIR}/web-server/conf/* ${CATALINA_HOME}/conf/ && rm -f ${CATALINA_HOME}/conf/Catalina/localhost/share.xml -RUN cp -a ${DISTDIR}/web-server/lib/* ${CATALINA_HOME}/lib/ RUN cp -a ${DISTDIR}/licenses ${CATALINA_HOME}/ RUN cp -a ${DISTDIR}/keystore/metadata-keystore/keystore* ${CATALINA_HOME}/shared/classes/alfresco/extension/keystore/ RUN chmod -R o-rwx ${CATALINA_HOME}/ @@ -30,14 +29,15 @@ RUN sed -i \ ${CATALINA_HOME}/webapps/alfresco/WEB-INF/classes/log4j2.properties ADD amps /tmp/amps +ADD libs ${CATALINA_HOME}/lib/ RUN if [ -f /tmp/amps/alfresco-aos-module-*.amp ]; then umask 0027; \ unzip ${DISTDIR}/web-server/webapps/ROOT.war -d ${CATALINA_HOME}/webapps/ROOT/; \ cp ${CATALINA_HOME}/webapps/ROOT/META-INF/context.xml ${CATALINA_HOME}/conf/Catalina/localhost/ROOT.xml; \ unzip ${DISTDIR}/web-server/webapps/_vti_bin.war -d ${CATALINA_HOME}/webapps/_vti_bin/; \ else echo "No AOS module found"; \ fi -RUN java -jar ${DISTDIR}/bin/alfresco-mmt.jar install /tmp/amps/ ${CATALINA_HOME}/webapps/alfresco -nobackup -directory -RUN java -jar ${DISTDIR}/bin/alfresco-mmt.jar list ${CATALINA_HOME}/webapps/alfresco +RUN java -jar ${DISTDIR}/bin/alfresco-mmt.jar install /tmp/amps/ ${CATALINA_HOME}/webapps/alfresco -nobackup -directory && \ + java -jar ${DISTDIR}/bin/alfresco-mmt.jar list ${CATALINA_HOME}/webapps/alfresco FROM tomcat_base AS repo-rhlike ARG ALFRESCO_REPO_USER_ID diff --git a/repository/artifacts.json b/repository/artifacts.json index e97f526c..16e23def 100644 --- a/repository/artifacts.json +++ b/repository/artifacts.json @@ -1,6 +1,14 @@ { "artifacts": { "acs23": [ + { + "name": "postgresql", + "version": "42.7.3", + "classifier": ".jar", + "group": "org.postgresql", + "repository": "central", + "path": "repository/libs" + }, { "name": "alfresco-share-services", "version": "23.2.2.3", From a3da8b66d8b4d39c990cfe956d92aae2775cd43f Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 29 Jul 2024 17:04:23 +0200 Subject: [PATCH 2/3] add extra jars readme file --- repository/libs/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 repository/libs/README.md diff --git a/repository/libs/README.md b/repository/libs/README.md new file mode 100644 index 00000000..b4b4758d --- /dev/null +++ b/repository/libs/README.md @@ -0,0 +1,4 @@ +# Alfresco Content Repository extra jars + +Place here additionnal jar files you want to be depoloyed in Tomcat lib directory. +This is a suitable way to add JDBC drivers, for example. From 42926dd24dbaf3f84fdab73a8236110aae711cda Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 29 Jul 2024 18:12:05 +0200 Subject: [PATCH 3/3] use version from the supported stack matrix --- repository/artifacts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/artifacts.json b/repository/artifacts.json index 16e23def..400d662f 100644 --- a/repository/artifacts.json +++ b/repository/artifacts.json @@ -3,7 +3,7 @@ "acs23": [ { "name": "postgresql", - "version": "42.7.3", + "version": "42.6.0", "classifier": ".jar", "group": "org.postgresql", "repository": "central",