AlfrescoArchive / acs-community-deployment

NOTE: This repository is now deprecated and archived as the https://github.com/Alfresco/acs-deployment repository is now the centralized place to find containerized deployment artefacts and documentation.

Home Page:https://hub.alfresco.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker compose - IO error when trying to deploy alfresco amp

asotog opened this issue · comments

Hi,
I'm using alfresco content services 6.2 docker-compose file https://github.com/Alfresco/acs-community-deployment/blob/master/docker-compose/docker-compose.yml

  • starts correct
  • if i deploy a custom share amp file to share a container, is successful
  • but if i try to deploy an alfresco amp file to the alfresco container i get this error but execute this command first:
    java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps/alfresco-customization.amp /usr/local/tomcat/webapps/alfresco -verbose -force

08110000 An IO error was encountered during deployment of the AMP into the WAR

please let me know if you have any guidance, thanks in advance,

It could be due to permission errors. You have not shared full error log so not sure. But there is a better way to install amps when using docker-compose.yml.

Follow these steps:

1- Create a folder named build-config in same folder where you have kept your docker-compose.yml file
2- Create two folders named, alfresco and share within build-config folder
3- Create a folder named extensions in alfresco and share folders.
4- Copy your repo layer custom or third party amps in the build-config/alfresco/extensions folder
5- Copy your share layer custom or third party amps in the build-config/share/extensions folder
6- Create a file named DockerFile under build-config/alfresco which will be used for building alfresco image
7- Copy following instructions in the DockerFile (build-config/alfresco)

       FROM alfresco/alfresco-content-repository-community:6.2.1-A8

	#Change to root
	USER root

	# Copy extensions jar module if there are any
	COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/

	# Copy and apply amp extensions
	COPY Dockerfile extensions/*.amp $TOMCAT_DIR/amps/
	RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
				  $TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force

	#Change back to alfresco
	USER alfresco

8- Create a file named DockerFile under build-config/share which will be used for building share image
9- Copy following instructions in the DockerFile (build-config/share)

        FROM alfresco/alfresco-share:6.2.1

	# Copy extensions jar module if there are any
	COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/share/WEB-INF/lib/

	# Copy and apply amp extensions
	COPY Dockerfile add-ons/*.amp $TOMCAT_DIR/amps_share/
	RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
				  $TOMCAT_DIR/amps_share $TOMCAT_DIR/webapps/share -directory -nobackup -force

10- Update the docker-compose.yml for alfresco and share services as:

  alfresco:
	build:
          dockerfile: ./Dockerfile
          context: ./build-config/alfresco
        mem_limit: 1500m
        environment:
            JAVA_OPTS: "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                -Dshare.host=127.0.0.1
                -Dshare.port=8080
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\"
                -Ddeployment.method=DOCKER_COMPOSE
                -DlocalTransform.core-aio.url=http://transform-core-aio:8090/
                -Dalfresco-pdf-renderer.url=http://transform-core-aio:8090/
                -Djodconverter.url=http://transform-core-aio:8090/
                -Dimg.url=http://transform-core-aio:8090/
                -Dtika.url=http://transform-core-aio:8090/
                -Dtransform.misc.url=http://transform-core-aio:8090/
                -Dcsrf.filter.enabled=false
                -Xms1500m -Xmx1500m
                "
   share:
        build:
          dockerfile: ./Dockerfile
          context: ./build-config/share
        mem_limit: 1g
        environment:
            REPO_HOST: "alfresco"
            REPO_PORT: "8080"
            JAVA_OPTS: "
                -Xms500m
                -Xmx500m
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Dalfresco.context=alfresco
                -Dalfresco.protocol=http
                "

11- Launch the containers again, use following command:

`docker-compose -f ./docker-compose.yml up --build`

appreciate your help @abhinavmishra14 but yeah no more error messages, will try this, thank you

It looks like some help has been provided to resolve this issue so closing before the repository is archived as per the recent blog post: https://hub.alfresco.com/t5/alfresco-content-services-blog/acs-community-repositories-consolidation/ba-p/302770