Tomcat server with installation by Docker

cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Former Member

Tomcat server with installation by Docker

Hello,

I recently did an installation of Alfresco Community Edition on Windows Server 2019 with Docker Desktop (because of the compatibility of the Alfresco images which doesn't run on Windows but on Linux).

I used the "docker-compose.yml" file. But now that I want to configure the mails, I have to use the "alfresco-global.properties" file and I noticed that I need Tomcat with it, because I don't have this file, is there a way to put Tomcat in the "docker-compose.yml" file? or should I launch it next to it? How to do it ?

Excuse me, I'm new in this field.

Thank you in advance

1 Reply
abhinavmishra14
Advanced

Re: Tomcat server with installation by Docker

If i can understand correctly, you want to add SMTP configuration for Outbound/Inbound emails.

You dont need tomcat. ACS images has built-in tomcat and you can find the alfresco-global.properties files located in $TOMCAT_HOME/share/classes/ directory. If you have used docker-compose.yml to start acs containers, you can simply update the docker-compose.yml. you need to update the ACS service difinition and add smtp config properties under JAVA_OPTS and restart the containers again. Make sure ports are open to connect to SMTP server.

 

example:

version: "2"

services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.0-ea
        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=8081
                -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
                -Dlocal.transform.service.enabled=true
                -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
                -DlocalTransform.imagemagick.url=http://imagemagick:8090/
                -DlocalTransform.libreoffice.url=http://libreoffice:8090/
                -DlocalTransform.tika.url=http://tika:8090/
                -DlocalTransform.misc.url=http://transform-misc:8090/
                -Dlegacy.transform.service.enabled=true
                -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
                -Djodconverter.url=http://libreoffice:8090/
                -Dimg.url=http://imagemagick:8090/
                -Dtika.url=http://tika:8090/
                -Dtransform.misc.url=http://transform-misc:8090/
                -Dcsrf.filter.enabled=false
                -Dftp.enabled=true
                -Dftp.port=21
		-Dmail.host=127.0.0.1 #example host. use appropriate host as per your current setup
                -Dmail.port=21 #example port. use appropriate port as per your current setup
		-Dmail.encoding=UTF-8
                -Dmail.from.default=local@yourorg.com
                -Xms1500m -Xmx1500m
                "
    

Refer this doc: https://docs.alfresco.com/6.2/concepts/email-outboundsmtp-props.html

Similarly you can setup inbound properties as well.

If you are running a test environment and don't have SMTP server then you can also try adding this to your docker compose file.

#SMTP service
smtp: image: mwader/postfix-relay

See details here: https://hub.docker.com/r/mwader/postfix-relay

version: "2"
services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.0-ea
        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=8081
                -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
                -Dlocal.transform.service.enabled=true
                -DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
                -DlocalTransform.imagemagick.url=http://imagemagick:8090/
                -DlocalTransform.libreoffice.url=http://libreoffice:8090/
                -DlocalTransform.tika.url=http://tika:8090/
                -DlocalTransform.misc.url=http://transform-misc:8090/
                -Dlegacy.transform.service.enabled=true
                -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
                -Djodconverter.url=http://libreoffice:8090/
                -Dimg.url=http://imagemagick:8090/
                -Dtika.url=http://tika:8090/
                -Dtransform.misc.url=http://transform-misc:8090/
                -Dcsrf.filter.enabled=false
                -Dftp.enabled=true
                -Dftp.port=21				
		-Dmail.host=smtp
		-Dmail.port=25 
		-Dmail.username=anonymous 
		-Dmail.password=
		-Dmail.protocol=smtp 
		-Dmail.smtps.starttls.enable=false 
		-Dmail.smtps.auth=false
                -Xms1500m -Xmx1500m
                "
        ports:
            - 21:21 #FTP Server

    #SMTP service
	smtp:
	   image: mwader/postfix-relay
~Abhinav
(ACSCE, AWS SAA, Azure Admin)