Skip to content

Commit

Permalink
Fixes after tests on ACS 7.3, 7.4, 23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AFaust committed Jun 8, 2024
1 parent 884cfa1 commit 3e72e76
Show file tree
Hide file tree
Showing 11 changed files with 432 additions and 12 deletions.
29 changes: 29 additions & 0 deletions Dockerfile-ACS-23.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alfresco/alfresco-content-repository-community:23.1.0
USER root

ARG AMP_PATH=full/repository/target
ARG AMP_NAME=de.acosix.alfresco.utility.repo-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/amps/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/$AMP_NAME $TOMCAT_DIR/webapps/alfresco -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/alfresco -nobackup -force

# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,
# group only has restricted permissions and world has no permissions.
RUN chown -R root:${GROUPNAME} ${TOMCAT_DIR}/webapps/alfresco ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/lib ${TOMCAT_DIR}/shared/classes && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/webapps/alfresco && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/shared && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/lib && \
chmod 664 ${TOMCAT_DIR}/amps/*

USER ${IMAGEUSERNAME}
29 changes: 29 additions & 0 deletions Dockerfile-ACS-7.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alfresco/alfresco-content-repository-community:7.3.2
USER root

ARG AMP_PATH=full/repository/target
ARG AMP_NAME=de.acosix.alfresco.utility.repo-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/amps/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/$AMP_NAME $TOMCAT_DIR/webapps/alfresco -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/alfresco -nobackup -force

# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,
# group only has restricted permissions and world has no permissions.
RUN chown -R root:${GROUPNAME} ${TOMCAT_DIR}/webapps/alfresco ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/lib ${TOMCAT_DIR}/shared/classes && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/webapps/alfresco && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/shared && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/lib && \
chmod 664 ${TOMCAT_DIR}/amps/*

USER ${IMAGEUSERNAME}
29 changes: 29 additions & 0 deletions Dockerfile-ACS-7.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alfresco/alfresco-content-repository-community:7.4.2
USER root

ARG AMP_PATH=full/repository/target
ARG AMP_NAME=de.acosix.alfresco.utility.repo-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/amps/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/$AMP_NAME $TOMCAT_DIR/webapps/alfresco -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps/support-tools-repo-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/alfresco -nobackup -force

# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,
# group only has restricted permissions and world has no permissions.
RUN chown -R root:${GROUPNAME} ${TOMCAT_DIR}/webapps/alfresco ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/lib ${TOMCAT_DIR}/shared/classes && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/webapps/alfresco && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/shared && \
chmod -R u=rwX,g=rX,o= ${TOMCAT_DIR}/lib && \
chmod 664 ${TOMCAT_DIR}/amps/*

USER ${IMAGEUSERNAME}
16 changes: 16 additions & 0 deletions Dockerfile-Share-23.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alfresco/alfresco-share:23.1.0

ARG AMP_PATH=full/share/target
ARG AMP_NAME=de.acosix.alfresco.utility.share-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/amps_share/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/$AMP_NAME $TOMCAT_DIR/webapps/share -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/share -nobackup -force
16 changes: 16 additions & 0 deletions Dockerfile-Share-7.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alfresco/alfresco-share:7.3.2

ARG AMP_PATH=full/share/target
ARG AMP_NAME=de.acosix.alfresco.utility.share-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/amps_share/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/$AMP_NAME $TOMCAT_DIR/webapps/share -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/share -nobackup -force
16 changes: 16 additions & 0 deletions Dockerfile-Share-7.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM alfresco/alfresco-share:7.4.2

ARG AMP_PATH=full/share/target
ARG AMP_NAME=de.acosix.alfresco.utility.share-1.4.0-SNAPSHOT.amp

ARG TOMCAT_DIR=/usr/local/tomcat

# fix to deal with "warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
RUN yum install -y glibc-langpack-en

COPY $AMP_PATH/$AMP_NAME support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/amps_share/

RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/$AMP_NAME $TOMCAT_DIR/webapps/share -nobackup -force \
&& java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
$TOMCAT_DIR/amps_share/support-tools-share-1.2.2.0-amp.amp $TOMCAT_DIR/webapps/share -nobackup -force
12 changes: 2 additions & 10 deletions core/share/src/main/config/module-context.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<property name="originalClassName" value="org.springframework.extensions.webscripts.connector.ConnectorProviderImpl" />
<property name="replacementClassName" value="de.acosix.alfresco.utility.core.share.javax.connector.SessionAwareConnectorProviderImpl" />
<property name="condition">
<bean class="${common.artifactId}.spring.ClassDefinedCondition">
<bean class="${common.artifactId}.spring.condition.ClassDefinedCondition">
<property name="className" value="javax.servlet.http.HttpServletRequest" />
</bean>
</property>
Expand All @@ -48,20 +48,12 @@
<property name="originalClassName" value="org.springframework.extensions.webscripts.connector.ConnectorProviderImpl" />
<property name="replacementClassName" value="de.acosix.alfresco.utility.core.share.jakarta.connector.SessionAwareConnectorProviderImpl" />
<property name="condition">
<bean class="${common.artifactId}.spring.ClassDefinedCondition">
<bean class="${common.artifactId}.spring.condition.ClassDefinedCondition">
<property name="className" value="jakarta.servlet.http.HttpServletRequest" />
</bean>
</property>
</bean>

<bean id="${moduleId}-webframework.connector.provider-sessionAwareWebScriptsConnectorProviderPatch"
class="${common.artifactId}.spring.ImplementationClassReplacingBeanFactoryPostProcessor">
<property name="enabled" value="true" />
<property name="targetBeanName" value="webframework.connector.provider" />
<property name="originalClassName" value="org.springframework.extensions.surf.WebFrameworkConnectorProvider" />
<property name="replacementClassName" value="${javaPackageName}.connector.SessionAwareConnectorProviderImpl" />
</bean>

<bean class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
Expand Down
99 changes: 99 additions & 0 deletions docker-compose-23.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
services:

postgres:
image: postgres:16.3
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG

alfresco:
depends_on:
- postgres
image: acosix-utility-repo-test:local
build:
context: ./
dockerfile: Dockerfile-ACS-23.1
volumes:
- alfresco_data:/usr/local/tomcat/alf_data
environment:
JAVA_OPTS: >-
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
-Dmetadata-keystore.password=mp6yc0UD9e
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=oKIWzVdEdA
-Dmetadata-keystore.metadata.algorithm=DESede
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=secret
-Dsolr.sharedSecret=secret
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true"
-Dlocal.transform.service.enabled=true
-DlocalTransform.core-aio.url=http://transform-core-aio:8090
-Dacosix-utility.email.inboundSMTP.subsystemEnhancement.enabled=true
-Dacosix-utility.email.server.enhancements.enabled=true
-Dacosix-utility.email.handler.folder.enhancements.enabled=true
-Demail.handler.folder.overwriteDuplicates=false
-Demail.server.enabled=true
-Dcsrf.filter.enabled=false
-Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888
-Xms2G -Xmx2G
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication
-XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
ports:
- 8080:8080
- 8888:8888
- 10025:25

share:
image: acosix-utility-share-test:local
build:
context: ./
dockerfile: Dockerfile-Share-23.1
environment:
REPO_HOST: alfresco
REPO_PORT: 8080
JAVA_OPTS: >-
-Xms500m -Xmx500m
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication
-XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
ports:
- 8180:8080

solr6:
image: alfresco/alfresco-search-services:2.0.10
environment:
SOLR_ALFRESCO_HOST: alfresco
SOLR_ALFRESCO_PORT: 8080
SOLR_SOLR_HOST: solr6
SOLR_SOLR_PORT: 8983
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco
ALFRESCO_SECURE_COMMS: secret
JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
SOLR_JAVA_MEM: -Xms2g -Xmx2g
ports:
- 8083:8983

activemq:
image: alfresco/alfresco-activemq:5.17-jre17-rockylinux8

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:5.1.2
environment:
JAVA_OPTS: " -Xms256m -Xmx1536m"
ACTIVEMQ_URL: nio://activemq:61616

volumes:
alfresco_data:
97 changes: 97 additions & 0 deletions docker-compose-7.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
services:

postgres:
image: postgres:16.3
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300 -c log_min_messages=LOG

alfresco:
depends_on:
- postgres
image: acosix-utility-repo-test:local
build:
context: ./
dockerfile: Dockerfile-ACS-7.3
volumes:
- alfresco_data:/usr/local/tomcat/alf_data
environment:
JAVA_OPTS: >-
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
-Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore
-Dmetadata-keystore.password=mp6yc0UD9e
-Dmetadata-keystore.aliases=metadata
-Dmetadata-keystore.metadata.password=oKIWzVdEdA
-Dmetadata-keystore.metadata.algorithm=DESede
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=secret
-Dsolr.sharedSecret=secret
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true"
-Dlocal.transform.service.enabled=true
-DlocalTransform.core-aio.url=http://transform-core-aio:8090
-Dacosix-utility.email.inboundSMTP.subsystemEnhancement.enabled=true
-Dacosix-utility.email.server.enhancements.enabled=true
-Dacosix-utility.email.handler.folder.enhancements.enabled=true
-Demail.handler.folder.overwriteDuplicates=false
-Demail.server.enabled=true
-Dcsrf.filter.enabled=false
-Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
-Xms2G -Xmx2G
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication
-XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
ports:
- 8080:8080
- 10025:25

share:
image: acosix-utility-share-test:local
build:
context: ./
dockerfile: Dockerfile-Share-7.3
environment:
REPO_HOST: alfresco
REPO_PORT: 8080
JAVA_OPTS: >-
-Xms500m -Xmx500m
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication
-XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+AlwaysPreTouch
ports:
- 8180:8080

solr6:
image: alfresco/alfresco-search-services:2.0.10
environment:
SOLR_ALFRESCO_HOST: alfresco
SOLR_ALFRESCO_PORT: 8080
SOLR_SOLR_HOST: solr6
SOLR_SOLR_PORT: 8983
SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco
ALFRESCO_SECURE_COMMS: secret
JAVA_TOOL_OPTIONS: -Dalfresco.secureComms.secret=secret
SOLR_JAVA_MEM: -Xms2g -Xmx2g
ports:
- 8083:8983

activemq:
image: alfresco/alfresco-activemq:5.17-jre17-rockylinux8

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:5.1.2
environment:
JAVA_OPTS: " -Xms256m -Xmx1536m"
ACTIVEMQ_URL: nio://activemq:61616

volumes:
alfresco_data:
Loading

0 comments on commit 3e72e76

Please sign in to comment.