How do share-config-custom.xml get generated?

cancel
Showing results for 
Search instead for 
Did you mean: 
Einar
Active Member

How do share-config-custom.xml get generated?

Hi!

I'm using a custom docker-image for share that uses the standard share image + some customized jars. I noticed that the file share-config-custom.xml already exists or gets generated if it does not. When comparing it to an earlier alfresco installation I noticed that the newer one had <config condition="CSRFPolicy"> while the older one did not.

Of course I can just include my own share-config-custom.xml and replace it in the Dockerfile before creating the custom image. But if it is generated when missing I'm afraid of missing potential new standard settings in future versions of the base image. Hence my question.

Also, is there a complete list of possible config conditions somewhere? (also is there a list for possible properties in alfresco-global.properties)

Thanks!

 

 

1 Reply
Einar
Active Member

Re: How do share-config-custom.xml get generated?

I found the answer, so I'll leave this here if anyone else comes across the same question.

Basically a share-config-custom.xml is included in the standard build of share (https://github.com/Alfresco/share/tree/master/packaging/docker/src/main/resources/web-extension-samp...)

This then gets copied in the Dockerfile for building share (https://github.com/Alfresco/share/blob/master/packaging/docker/Dockerfile)

Then it runs substituter.sh to use the env specified when launching the container  (https://github.com/Alfresco/share/blob/master/packaging/docker/substituter.sh) (Which explains why the documentation specifies these here under share: https://docs.alfresco.com/content-services/latest/install/containers/docker-compose/ )

In the substituter.sh, a sed command is used to replace values in the share-config-custom.xml.

In my case I needed to further customize the share-config-custom.xml, and therefore I will add specific sed commands for dealing with this since there are no more available env settings. That way I will recieve any future updates to share-config-custom.xml when upgrading share to a newer version. If I just copy the customized share-config-custom.xml in my own custom Dockerfile, I will need to check for any updates to it myself. But I'd rather not deal with that overhead. 

Hope it helps someone! Smiley Happy