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!
Solved! Go to Solution.
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!
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!
Hi, Einar! Sorry, maybe it is stupid, but can u provide please example of sed command? What do you do with that - change smth or add new config to share-config-custom file?
@maksym wrote:
Hi, Einar! Sorry, maybe it is stupid, but can u provide please example of sed command? What do you do with that - change smth or add new config to share-config-custom file?
Here are some example of sed commands you can refer and write your own :
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.