# Demonstrate changing acs, share and proxy ports to 7080, postgres port to 5555, solr6 port to 9999 # This docker-compose file will spin up an ACS cluster on a local host or on a server and it requires a minimum of 12GB Memory to distribute among containers. # Limit container memory and assign X percentage to JVM. There are couple of ways to allocate JVM Memory for ACS Containers # For example: 'JAVA_OPTS: "$JAVA_OPTS -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"' # See Oracle docs (https://docs.oracle.com/javase/9/gctuning/parallel-collector1.htm#JSGCT-GUID-CAB83393-3438-44ED-98F0-D15641B43C7D). # If the container memory is not explicitly set then the flags above will set the max heap default to 1/4 of the container's memory, which may not be ideal. # For performance tuning, assign the container memory and give a percentage of it to the JVM. # Using version 2 as 3 does not support resource constraint options (cpu_*, mem_* limits) for non swarm mode in Compose version: "2" services: alfresco: build: dockerfile: ./Dockerfile context: ./configs-to-override/alfresco args: ACS_TAG: ${ACS_TAG} mem_limit: 4g environment: JAVA_TOOL_OPTIONS: " -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 " JAVA_OPTS: " -Ddb.driver=org.postgresql.Driver -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.url=jdbc:postgresql://postgres:5555/alfresco -Dsolr.host=solr6 -Dsolr.port=9999 -Dsolr.http.connection.timeout=1000 -Dsolr.secureComms=secret -Dsolr.sharedSecret=secretpassword -Dsolr.base.url=/solr -Dindex.subsystem.name=solr6 -Dshare.host=127.0.0.1 -Dshare.port=7080 -Dalfresco.host=127.0.0.1 -Dalfresco.port=7080 -Daos.baseUrlOverwrite=http://127.0.0.1:7080/alfresco/aos -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\" -Ddeployment.method=DOCKER_COMPOSE -Dlocal.transform.service.enabled=true -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ -Dcsrf.filter.enabled=false -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 " volumes: - acs-volume:/usr/local/tomcat/alf_data depends_on: - postgres - solr6 transform-core-aio: image: alfresco/alfresco-transform-core-aio:${TRANSFORMATION_CORE_TAG} mem_limit: 1536m environment: JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 -Dlogging.level.org.alfresco.transform.common.TransformerDebug=error -Dlogging.level.org.alfresco.transform.router.TransformerDebug=error " ports: - 8090:8090 share: build: dockerfile: ./Dockerfile context: ./configs-to-override/share args: SHARE_TAG: ${SHARE_TAG} mem_limit: 2g environment: REPO_HOST: "alfresco" REPO_PORT: "7080" JAVA_OPTS: " -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 -Dalfresco.host=localhost -Dalfresco.port=7080 -Dalfresco.context=alfresco -Dalfresco.protocol=http " postgres: image: postgres:${POSTGRES_TAG} mem_limit: 1g environment: - POSTGRES_PASSWORD=alfresco - POSTGRES_USER=alfresco - POSTGRES_DB=alfresco - PGPORT=5555 command: postgres -c max_connections=300 -c log_min_messages=LOG ports: - 5555:5555 volumes: - db-volume:/var/lib/postgresql/data solr6: build: dockerfile: ./Dockerfile context: ./configs-to-override/solr args: ASS_TAG: ${ASS_TAG} mem_limit: 2g environment: # Solr needs to know how to register itself with Alfresco SOLR_ALFRESCO_HOST: "alfresco" SOLR_ALFRESCO_PORT: "7080" #Solr jetty port, to start solr6 on port 9999 SOLR_PORT: "9999" # Alfresco needs to know how to call solr SOLR_SOLR_HOST: "solr6" SOLR_SOLR_PORT: "9999" # Create the default alfresco and archive cores SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" SOLR_JAVA_MEM: "-Xms2g -Xmx2g" # HTTPS or SECRET ALFRESCO_SECURE_COMMS: "secret" # SHARED SECRET VALUE JAVA_TOOL_OPTIONS: " -Dalfresco.secureComms.secret=secretpassword " ports: - 8083:9999 #Browser port volumes: - ass-volume:/opt/alfresco-search-services/data activemq: image: alfresco/alfresco-activemq:${AMQ_TAG} mem_limit: 1g ports: - 8161:8161 # Web Console - 5672:5672 # AMQP - 61616:61616 # OpenWire - 61613:61613 # STOMP proxy: build: dockerfile: ./Dockerfile context: ./configs-to-override/proxy args: NGNIX_TAG: ${NGNIX_TAG} mem_limit: 256m depends_on: - alfresco environment: DISABLE_PROMETHEUS: "true" DISABLE_SYNCSERVICE: "true" DISABLE_ADW: "true" DISABLE_CONTROL_CENTER: "true" ENABLE_CONTENT_APP: "false" ports: - 7080:7080 links: - alfresco - share # Named docker volumes top-level # Docker compose external named volumes can be used across the Docker installation and # they need to be created by the user (otherwise fails) using the docker volume create command. volumes: acs-volume: #Not sharing the volume yet, when plan to share volume between services, enable 'external' #external: true db-volume: #Not sharing the volume yet, when plan to share volume between services, enable 'external' #external: true ass-volume: #Not sharing the volume yet, when plan to share volume between services, enable 'external' #external: true