07-08-2021 07:38 AM
i am facing difficulties in finding the alfresco-global.properties file . i am using docker to run alfreso community editon 7.0
how can i access this file and update this file.can any one help me out
07-08-2021 04:25 PM
@waqar wrote:
i am facing difficulties in finding the alfresco-global.properties file . i am using docker to run alfreso community editon 7.0
how can i access this file and update this file.can any one help me out
The alfresco-global.properties in ACS container is usually empty. There may be no properties. It can be found at this path : /usr/local/tomcat/shared/classes/alfresco-global.properties in the ACS container.
sh-4.4$ ls -l
total 4
drwxr-xr-x 1 root Alfresco 4096 May 20 20:22 alfresco
-rw-r--r-- 1 root Alfresco 0 May 20 20:22 alfresco-global.properties
sh-4.4$ pwd
/usr/local/tomcat/shared/classes
You can connect to the container shell and look for the file using below commands:
##### Get container name or short container id: - docker ps ### Grab the container name of id, for example container name is: "acs7_alfresco_1", then to connect the container use the below command: - docker exec -it <containerName/containerId> /bin/bash
example: - docker exec -it acs7_alfresco_1 /bin/bash
### Cd into /usr/local/tomcat/shared/classes
- cd /usr/local/tomcat/shared/classes
- cat alfresco-global.properties
Above commands will connect you to the docker container shell. Alternatively you can connect to shell from Docker Desktop Containers list if you are using docker desktop.
Please note that, any changes made to this file under container is not persisted and you will loose all your changes if container is terminated and re-launced.
There are better ways to add/update properties.
A- Use JAVA_OPTS, to add/update/override (any ootb prop). See example here: https://github.com/Alfresco/acs-deployment/blob/master/docker-compose/community-docker-compose.yml#L...
Follow these steps:
1- Create a folder named build-config in same folder where you have kept your docker-compose.yml file
2- Create a folder named, 'alfresco' within build-config folder
3- Create a folder named extensions in 'alfresco' folder.
4- Copy your repo layer custom or third party amps in the build-config/alfresco/extensions folder
5- Create a file named 'DockerFile' under 'build-config/alfresco' which will be used for building alfresco image
6- Copy following instructions in the DockerFile (build-config/alfresco), e.g.:
FROM alfresco/alfresco-content-repository-community:7.1.0-M1 ARG TOMCAT_DIR=/usr/local/tomcat #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 #Copy and override the alfresco-global.properties which comes with custom image. Which is typically empty. #It could be useful in cases when you already built a custom image but launch an container with some additional config in global properties. COPY alfresco-global.properties $TOMCAT_DIR/shared/classes/alfresco-global.properties
7- Update the docker-compose.yml for 'alfresco' service as e.g.:
alfresco: build: dockerfile: ./Dockerfile context: ./build-config/alfresco mem_limit: 1500m 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:5432/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -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/ -Dcsrf.filter.enabled=false -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 "
8- Launch the containers again, use following command:
docker-compose -f ./docker-compose.yml up --build
See the example here: https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15
07-08-2021 09:47 AM
07-08-2021 04:25 PM
@waqar wrote:
i am facing difficulties in finding the alfresco-global.properties file . i am using docker to run alfreso community editon 7.0
how can i access this file and update this file.can any one help me out
The alfresco-global.properties in ACS container is usually empty. There may be no properties. It can be found at this path : /usr/local/tomcat/shared/classes/alfresco-global.properties in the ACS container.
sh-4.4$ ls -l
total 4
drwxr-xr-x 1 root Alfresco 4096 May 20 20:22 alfresco
-rw-r--r-- 1 root Alfresco 0 May 20 20:22 alfresco-global.properties
sh-4.4$ pwd
/usr/local/tomcat/shared/classes
You can connect to the container shell and look for the file using below commands:
##### Get container name or short container id: - docker ps ### Grab the container name of id, for example container name is: "acs7_alfresco_1", then to connect the container use the below command: - docker exec -it <containerName/containerId> /bin/bash
example: - docker exec -it acs7_alfresco_1 /bin/bash
### Cd into /usr/local/tomcat/shared/classes
- cd /usr/local/tomcat/shared/classes
- cat alfresco-global.properties
Above commands will connect you to the docker container shell. Alternatively you can connect to shell from Docker Desktop Containers list if you are using docker desktop.
Please note that, any changes made to this file under container is not persisted and you will loose all your changes if container is terminated and re-launced.
There are better ways to add/update properties.
A- Use JAVA_OPTS, to add/update/override (any ootb prop). See example here: https://github.com/Alfresco/acs-deployment/blob/master/docker-compose/community-docker-compose.yml#L...
Follow these steps:
1- Create a folder named build-config in same folder where you have kept your docker-compose.yml file
2- Create a folder named, 'alfresco' within build-config folder
3- Create a folder named extensions in 'alfresco' folder.
4- Copy your repo layer custom or third party amps in the build-config/alfresco/extensions folder
5- Create a file named 'DockerFile' under 'build-config/alfresco' which will be used for building alfresco image
6- Copy following instructions in the DockerFile (build-config/alfresco), e.g.:
FROM alfresco/alfresco-content-repository-community:7.1.0-M1 ARG TOMCAT_DIR=/usr/local/tomcat #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 #Copy and override the alfresco-global.properties which comes with custom image. Which is typically empty. #It could be useful in cases when you already built a custom image but launch an container with some additional config in global properties. COPY alfresco-global.properties $TOMCAT_DIR/shared/classes/alfresco-global.properties
7- Update the docker-compose.yml for 'alfresco' service as e.g.:
alfresco: build: dockerfile: ./Dockerfile context: ./build-config/alfresco mem_limit: 1500m 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:5432/alfresco -Dsolr.host=solr6 -Dsolr.port=8983 -Dsolr.http.connection.timeout=1000 -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/ -Dcsrf.filter.enabled=false -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 "
8- Launch the containers again, use following command:
docker-compose -f ./docker-compose.yml up --build
See the example here: https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15
07-09-2021 05:27 AM
I am really grateful that you have responded.can you elaborate this point further.where is actually repo layer custom or third party amps
4- Copy your repo layer custom or third party amps in the build-config/alfresco/extensions folder
07-09-2021 06:08 AM
All amp files which will be placed by you in the folder ./build-config/alfresco/extensions will be installed during custom image will be creating.
07-09-2021 06:47 AM
actually where are those amp files located.from where should i get these amp files.please help
07-09-2021 08:45 AM
@waqar wrote:
actually where are those amp files located.from where should i get these amp files.please help
You don't need to download any amps or jar files. The steps are provided in case you have any custom modules that you have developed in the form of "amp" / "jar" Or you are gonna use any third party amps/jars . If you wish to apply that custom module to repository layer, you would copy it in the "extensions" directory. And during build all your extensions/modules would be applied on alfresco war file under ACS container.
If you don't have anything at present, you can leave the folder empty or with a readme file containing this clarification for future reference.
If you want to apply custom modules to share war, then you can take similar approach as outlined for alfresco war.
Explore our Alfresco products with the links below. Use labels to filter content by product module.