alfresco-global.properties location

cancel
Showing results for 
Search instead for 
Did you mean: 
waqar
Member II

alfresco-global.properties location

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

6 Replies
cristinamr
Advanced

Re: alfresco-global.properties location

Hi

You should have it on {installation_path}/volumes/config/alfresco-global.properties E.g.: /opt/alfresco/volumes/config/alfresco-global.properties

Cheers,

Cristina.

--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc
abhinavmishra14
Moderator
Moderator

Re: alfresco-global.properties location


@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 restarted. 

 

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...

 

B- Make use of DockerFile and docker-compose.yml in combination to build custom acs image with your custom configs including alfresco-global.properties. 

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

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)
waqar
Member II

Re: alfresco-global.properties location

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

 

 

fedorow
Senior Member

Re: alfresco-global.properties location

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.

waqar
Member II

Re: alfresco-global.properties location

actually where are those amp files located.from where should i get these amp files.please help

abhinavmishra14
Moderator
Moderator

Re: alfresco-global.properties location


@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. 

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)