minimal alfresco distribution

cancel
Showing results for 
Search instead for 
Did you mean: 
lucastancapiano
Partner

minimal alfresco distribution

Hi everyone,
I started alfresco 6.2 via docker. It's possible to make a minimum distribution excluding Solr, ActiveMQ, all transformers, and Share? What are the properties to configure in the content service to exclude all it can be excluded?

4 Replies
abhinavmishra14
Advanced

Re: minimal alfresco distribution

Here is one with minimum but required configuration:

# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"

services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.1-A8
        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
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.subsystem.autoStart=false
                -Ddeployment.method=DOCKER_COMPOSE
                -Dcsrf.filter.enabled=false
                -Dtransform.service.enabled=false
                -Dlocal.transform.service.enabled=false
                -Dlegacy.transform.service.enabled=false
                -Xms1500m -Xmx1500m
                "
                
        ports:
            - 8080:8080
            
    postgres:
        image: postgres:11.7
        mem_limit: 512m
        environment:
            - POSTGRES_PASSWORD=alfresco
            - POSTGRES_USER=alfresco
            - POSTGRES_DB=alfresco
        command: postgres -c max_connections=300 -c log_min_messages=LOG
        ports:
            - 5432:5432

    solr6:
        image: alfresco/alfresco-search-services:2.0.1
        mem_limit: 2g
        environment:
            #Solr needs to know how to register itself with Alfresco
            - SOLR_ALFRESCO_HOST=alfresco
            - SOLR_ALFRESCO_PORT=8080
            #Alfresco needs to know how to call solr
            - SOLR_SOLR_HOST=solr6
            - SOLR_SOLR_PORT=8983
            #Create the default alfresco and archive cores
            - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
            #HTTP by default
            - ALFRESCO_SECURE_COMMS=none
            - "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
        ports:
            - 8083:8983 #Browser port

If you are using Postgresql that is running on different host (that is open for connections) then you can remove that from docker compose and update the properties accordingly e.g.:

# Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose
version: "2"

services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.1-A8
        mem_limit: 1500m
        environment:
            JAVA_OPTS: "
                -Ddb.driver=org.postgresql.Driver
                -Ddb.username=alfresco
                -Ddb.password=alfresco
                -Ddb.url=jdbc:postgresql://192.168.2.32:5432/alfresco
                -Dsolr.host=solr6
                -Dsolr.port=8983
                -Dsolr.secureComms=none
                -Dsolr.base.url=/solr
                -Dindex.subsystem.name=solr6
                -Dalfresco.host=localhost
                -Dalfresco.port=8080
                -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos
                -Dmessaging.subsystem.autoStart=false
                -Ddeployment.method=DOCKER_COMPOSE
                -Dcsrf.filter.enabled=false
                -Dtransform.service.enabled=false
                -Dlocal.transform.service.enabled=false
                -Dlegacy.transform.service.enabled=false
                -Xms1500m -Xmx1500m
                "
                
        ports:
            - 8080:8080
            
     solr6:
        image: alfresco/alfresco-search-services:2.0.1
        mem_limit: 2g
        environment:
            #Solr needs to know how to register itself with Alfresco
            - SOLR_ALFRESCO_HOST=alfresco
            - SOLR_ALFRESCO_PORT=8080
            #Alfresco needs to know how to call solr
            - SOLR_SOLR_HOST=solr6
            - SOLR_SOLR_PORT=8983
            #Create the default alfresco and archive cores
            - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
            #HTTP by default
            - ALFRESCO_SECURE_COMMS=none
            - "SOLR_JAVA_MEM=-Xms2g -Xmx2g"
        ports:
            - 8083:8983 #Browser port

Similarly you can even remove solr6 service from docker compose if you have an instance running on a different host (that is open for connections), make sure to update the properties accordingly. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
abhinavmishra14
Advanced

Re: minimal alfresco distribution

Part2-

Please note that transformations won't work after removing AMQ and tranformation services.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
lucastancapiano
Partner

Re: minimal alfresco distribution

Thank you. Can we put share inside the alfresco container?

abhinavmishra14
Advanced

Re: minimal alfresco distribution


@lucastancapiano wrote:

Thank you. Can we put share inside the alfresco container?


Yes, you can do it. You need to make sure that properties on share and alfresco services are appropriate in order for them to connect to each other.

Check these links for reference: 

https://github.com/Alfresco/acs-deployment/blob/master/docker-compose/6.2.N-docker-compose.yml#L88

https://github.com/Alfresco/acs-deployment/blob/master/docker-compose/community-docker-compose.yml

~Abhinav
(ACSCE, AWS SAA, Azure Admin)