ACS docker-compose with external volume for alfresco repo and solr indexes

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

ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

Hi,

Could anyone provide an example of an ACS (latest version if possible) docker-compose, and related Dockerfiles, using an external DB and external volumes?

Thanks in advance

Regards

1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution
12 Replies
angelborroy
Alfresco Employee

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

I guess that could help:

https://github.com/Alfresco/alfresco-docker-installer

Hyland Developer Evangelist
d5m1
Partner

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

Hi,

Thanks for the reponse, Angel.

Volumes used in the provided link just applies to postgres and solr, what I need is to set an external (not bind mount) volume for the alfresco repo, which in V6.2.2 uses a "shared file store" in this manner:

services:
alfresco:
image: alfresco/alfresco-content-repository:6.2.2-RC1
mem_limit: 1700m
environment:
JAVA_OPTS: "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbcSmiley Tongueostgresql://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=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE
-Dtransform.service.enabled=true
-Dtransform.service.url=http://transform-router:8095
-Dsfs.url=http://shared-file-store:8099/
-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
-Ddsync.service.uris=http://localhost:9090/alfresco
-DtrialUid=id5487903
-Xms1500m
-Xmx1500m
"

.......

shared-file-store:
image: alfresco/alfresco-shared-file-store:0.7.0
mem_limit: 512m
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
scheduler.content.age.millis: 86400000
scheduler.cleanup.interval: 86400000
ports:
- 8099:8099
volumes:
- shared-file-store-volume:/tmp/Alfresco/sfs

.....

volumes:
shared-file-store-volume:
driver_opts:
type: tmpfs
device: tmpfs

 

On the other hand, I need to use an external, Oracle DB.

kaynezhang
Advanced

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution
services:
  alfresco:
    image: alfresco/alfresco-content-repository:6.2.2-RC1
    mem_limit: 1700m
    environment:
      JAVA_OPTS: "
      -Ddb.driver=oracle.jdbc.driver.OracleDriver
      -Ddb.username=alfresco
      -Ddb.password=alfresco
      -Ddb.url=jdbc:oracle:thin:@/ip:1521/udp
      -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=\"failovernio://activemq:61616)?timeout=3000&jms.useCompression=true\"
      -Ddeployment.method=DOCKER_COMPOSE
      -Dtransform.service.enabled=true
      -Dtransform.service.url=http://transform-router:8095
      -Dsfs.url=http://shared-file-store:8099/
      -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
      -Ddsync.service.uris=http://localhost:9090/alfresco
      -DtrialUid=id5487903
      -Xms1500m
      -Xmx1500m
      "
    volumes:
      - /your data path:/usr/local/tomcat/alf_data
d5m1
Partner

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

Thanks for your answer.

 

What about this?

-Dsfs.url=http://shared-file-store:8099/

 

Won't be alfresco repo using the shared file store?

kaynezhang
Advanced

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

It is used for asynchronously content transformation(also text extraction for full text search).

ACS community edition dose not use this property now. 

d5m1
Partner

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

Thanks for the clarification.

I was finally able to run ACS through the next docker-compose, based on the template provided by Alfresco from the docs site (https://www.alfresco.com/platform/content-services-ecm/trial/download):

version: "2"

services:
alfresco:
image: alfresco/alfresco-content-repository:6.2.2-RC1-Oracle
build:
context: ./alfresco
dockerfile: Dockerfile
mem_limit: 1700m
environment:
JAVA_OPTS: "
-Ddb.driver=oracle.jdbc.OracleDriver
-Ddb.username=<db_user>
-Ddb.password=<passw>
-Ddb.url=jdbcSmiley Surprisedracle:thin:@<db_server>:<db_port>:<db_instance>
-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=\"failoverSmiley Sadnio://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Ddeployment.method=DOCKER_COMPOSE
-Dtransform.service.enabled=true
-Dtransform.service.url=http://transform-router:8095
-Dsfs.url=http://shared-file-store:8099/
-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
-Ddsync.service.uris=http://localhost:9090/alfresco
-DtrialUid=id5487903
-Xms1500m
-Xmx1500m
"

volumes:
- /datos/alf_data:/usr/local/tomcat/alf_data

transform-router:
mem_limit: 512m
image: quay.io/alfresco/alfresco-transform-router:1.3.0-RC1
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ACTIVEMQ_URL: "nio://activemq:61616"

CORE_AIO_URL: "http://transform-core-aio:8090"

FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8095:8095
links:
- activemq

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.2.2
mem_limit: 1536m
environment:
JAVA_OPTS: " -Xms256m -Xmx1536m"
ACTIVEMQ_URL: "nio://activemq:61616"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8090:8090
links:
- activemq

share:
image: alfresco/alfresco-share:6.2.2-RC2
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 "

solr6:
image: alfresco/alfresco-search-services:1.4.2
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

volumes:
- /datos/solr_data:/opt/alfresco-search-services/data

activemq:
image: alfresco/alfresco-activemq:5.15.8
mem_limit: 1g
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

digital-workspace:
image: quay.io/alfresco/alfresco-digital-workspace:1.5.0
mem_limit: 128m
environment:
BASE_PATH: ./

proxy:
image: alfresco/alfresco-acs-nginx:3.0.1
mem_limit: 128m
depends_on:
- alfresco
- digital-workspace
ports:
- 8080:8080
links:
- digital-workspace
- alfresco
- share

sync-service:
image: quay.io/alfresco/service-sync:3.3.2-Oracle
build:
context: ./sync-service
dockerfile: Dockerfile
mem_limit: 1g
environment:
JAVA_OPTS: " -Dsql.db.driver=oracle.jdbc.OracleDriver -Dsql.db.url=jdbcSmiley Surprisedracle:thin:@<db_server>:<db_port>:<db_instance> -Dsql.db.username=<db_user> -Dsql.db.password=<passw> -Dmessaging.broker.host=activemq -Drepo.hostname=alfresco -Drepo.port=8080 -Ddw.server.applicationConnectors[0].type=http -Xms1000m -Xmx1000m "

ports:
- 9090:9090

 

And these related Dockerfiles:

- Dockerfile for the "alfresco" service:

FROM alfresco/alfresco-content-repository:6.2.2-RC1
COPY ./ojdbc8.jar /usr/local/tomcat/lib

 

- Dockerfile for the "sync-service" service:

FROM quay.io/alfresco/service-sync:3.3.2
USER root
COPY ./ojdbc8.jar /opt/alfresco-sync-service/connectors
RUN chmod -R 777 /opt/alfresco-sync-service/*
RUN chgrp -R Alfresco /opt/alfresco-sync-service
RUN chown -R dsync:Alfresco /opt/alfresco-sync-service
USER dsync

 

Do you see anything wrongor improvable?

BTW, Is there a new, official docker-compose for version 3 (this ones uses version 2, quite old)? 

kaynezhang
Advanced

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution
d5m1
Partner

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

Hi,

What about the /opt/alfresco-search-services/contentstore? Shouldn't it be also mapped to an external volume?
Regards
kaynezhang
Advanced

Re: ACS docker-compose with external volume for alfresco repo and solr indexes

Jump to solution

You can map index data directory ,contentstore directory,solrhome directory out based on your requirements

 - your data pah :/opt/alfresco-search-services/data
- your contentstore pah :/opt/alfresco-search-services/contentsotre - your solr home path:/opt/alfresco-search-services/solrhome