08-28-2018 10:17 AM
Hello guys,
I have a custom model for my files, I added custom aspects to my nodes, Example: "Name_company:XYZ", Now I want to search for these properties on the search bar.
On internet it says something about adding a section of search on a file name share-config-custom.xml. But I'm running alfresco on docker so, I'm not sure how to modify this file. Inside the container i know where is the file but at runtime it doesn't let me mount the volume of the file because it has the same name and it's in use and dont let me replace the file.
What would be the best approach to do this?.
Thanks for your help.
08-28-2018 11:05 AM
You can include an extension from official Alfresco Share Docker image with something similar to the following:
FROM alfresco/alfresco-share:6.0
ARG TOMCAT_DIR=/usr/local/tomcat
RUN sed -i '/<\/alfresco-config>/i \
<config evaluator="string-compare" condition="CSRFPolicy" replace="true"> \n\
<filter/> \n\
</config>\n\
' $TOMCAT_DIR/shared/classes/alfresco/web-extension/share-config-custom.xml
In the sample, CSRF filter is being disabled but you can add your configuration for the Advanced Search.
Or you can overwrite share-config-custom.xml contents by using this other approach:
FROM alfresco/alfresco-share:6.0
ARG TOMCAT_DIR=/usr/local/tomcat
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension/share-config-custom.xml
Alternatively you can package your forms using Alfresco SDK and deploy it as a Share module (AMP or JAR)
08-28-2018 11:33 AM
Oh Thank you Angel, I'll try that
08-28-2018 12:35 PM
Or just mounting share-config-custom.xml as a local volume for share image in docker-compose.yml
Regards.
--C.
08-28-2018 12:41 PM
Mounting a local volume only for configuration purposes? I thought volumes were only recommended for persistence...
08-28-2018 01:29 PM
And why not to persist your custom configuration ? IMO, the approximation seems simpler, easier for managing and working with configuration files and you do not need to create custom images for basic / simple setups. Why to include docker RUN / COPY commands for "everything" ? I can't confirm if this is considered as a non-recommended practice from a docker point of view, maybe someone can give other arguments against it.
Regards.
--C.
08-28-2018 01:47 PM
I (more or less) agree with this: https://dantehranian.wordpress.com/2015/03/25/how-should-i-get-application-configuration-into-my-doc...
Anyway, I'm evaluating "docker config" for this kind of configurations.
08-28-2018 02:15 PM
Thanks for the link Angel Borroy.
Regards.
--C.
08-28-2018 01:54 PM
I tried to mount a local volume in the compose, but it says that the file already exist and does not allow me to replace it
08-29-2018 03:10 PM
Wow, I will check it.
Regards.
--C.
Explore our Alfresco products with the links below. Use labels to filter content by product module.