[Fix]: Solr remote url and properties settings#36
[Fix]: Solr remote url and properties settings#36GridexX wants to merge 1 commit intoxwiki:masterfrom
Conversation
a2f074e to
3ffa03f
Compare
Changes
TestTo ensure the fix is working, you can reproduce the following steps:
FROM xwiki:14
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["xwiki"]
docker build -t gridexx/xwiki .
docker run --rm -p 8080:8080 --name xwiki -e INDEX_HOST=solr -e INDEX_PORT=7000 gridexx/xwiki
docker exec xwiki cat /usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.properties | grep solr Here is the output: solr.type=remote
#-# The default is the subfolder "store/solr" inside folder defined by the property "environment.permanentDirectory".
# solr.embedded.home=/var/local/xwiki/store/solr
solr.remote.baseURL=http://solr:7000/solr/xwiki
...As we can see, we get the expected properties filled |
|
Thanks @GridexX I see several open issues related to Solr, see https://jira.xwiki.org/issues/?jql=text%20~%20%22solr%22%20and%20resolution%20%3D%20Unresolved%20and%20project%20%3D%20%22XWiki%20Docker%20images%22%20 Is this PR trying to fix https://jira.xwiki.org/browse/XDOCKER-183 ? Note that the way we work is by having a jira issue first and then doing a PR to fix it (and referencing the issue in the commit). See https://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HRule:AlwaysputaJIRAissuereferenceincommitmessages Also, should the documentation at https://github.com/xwiki/xwiki-docker/blob/master/README.md#using-an-external-solr-service be updated too or not? I've not tested your changes yet but I've noticed that you haven't updated the Thanks! |
3ffa03f to
8812f1e
Compare
improve replace properties function change solr remote url Signed-off-by: GridexX <arsene582@gmail.com>
8812f1e to
a91dcb8
Compare
|
Hello @vmassol, thanks a lot for the details! The documentation doesn't need to be updated, as I have fixed what was written and didn't work previously. According to what you said, I have modified my PR to include the JR issue number in the commit message and also modified the Feel free to test it when you will have time. Have a nice day ! |
|
Hi, The script extracts the jar file to a wrong locacion, the lastest Logsand now I see that the config options aren't even applied. I'll see whether the built in Solr works but from what I can see (including the age of this PR) the support for a separate Solr instance has ended. |
|
Got it to connect to my solr instance by modifying the entrypoint:
|
|
|
|
EDIT: Fixed it. See updated comments above for corrected setup scripts. Comment links: |
Context
Setting an external instance of Solr isn't working.
As describing in the documentation, you must change the
INDEX_HOSTandINDEX_PORTfor that.It should then update the
xwiki.propertiesfile with the following content:Test
After some tests, it appears that the properties baseURL is not added in the file.
Step to reproduce this issue
xwiki.propertiesfile:Which output the following:
As we can see, the baseURL is not the expected one (
http://localhost:8983/solr). We should have the following value, based on what was filled in the environment variables:solr.remote.baseURL=http://solr:7000/solrℹ️ This problem concerns both LTS and Stable version, every docker images are impacted.