Page:
Home
7
Home
Timothy Legge edited this page 2018-11-19 22:25:13 -04:00
Table of Contents
- Solr Notes
- Point {SolrPlugin}{Url} to the HostIP as the Solr Docker is accessible there
- Grant Solr User access to Foswiki Solr Config
- Run Solr 5 temporarly and create the solr_foswiki directory
- Run Solr with the proper volumes mounted, assign proper permission and add Foswiki configs
- Final start to load the Foswiki Config
- Testing Solr Index
Welcome to the docker-foswiki wiki!
Solr Notes
The following notes assume you have run Foswiki with the following command, configured, installed and enables SolrPlugin:
- sudo docker run --rm --name docker-foswiki -idt -p 80:80 -v foswiki_www:/var/www/foswiki:z -v nginx_conf:/etc/nginx/conf.d:z timlegge/docker-foswiki
Point {SolrPlugin}{Url} to the HostIP as the Solr Docker is accessible there
Grant Solr User access to Foswiki Solr Config
- sudo chown -R 8983:8983 /var/lib/docker/volumes/foswiki_www/_data/solr/configsets
Run Solr 5 temporarly and create the solr_foswiki directory
- sudo docker run --rm --name my_solr -d -P -p 8983:8983 -t solr:5
- sudo docker exec -it -u solr my_solr mkdir /opt/solr/server/solr/solr_foswiki
- sudo docker stop my_solr
Run Solr with the proper volumes mounted, assign proper permission and add Foswiki configs
- sudo docker run --rm --name my_solr -d -P -v solr_logs:/opt/solr/server/logs:z -v solr_configsets:/opt/solr/server/solr/configsets:z -v solr_foswiki:/opt/solr/server/solr/solr_foswiki:z -v foswiki_www:/var/www/foswiki:z -e GC_LOG_OPTS='' -e SOLR_LOG_LEVEL='WARN' -p 8983:8983 -t solr:5
- sudo chown -R 8983:8983 /var/lib/docker/volumes/solr_foswiki
- sudo docker exec -it -u solr my_solr cp -r /var/www/foswiki/solr/cores /opt/solr/server/solr/solr_foswiki/
- sudo docker exec -it -u solr my_solr ln -s /var/www/foswiki/solr/configsets/foswiki_configs /opt/solr/server/solr/configsets
- sudo docker stop my_solr
Final start to load the Foswiki Config
- sudo docker run --rm --name my_solr -d -P -v solr_logs:/opt/solr/server/logs:z -v solr_configsets:/opt/solr/server/solr/configsets:z -v solr_foswiki:/opt/solr/server/solr/solr_foswiki:z -v foswiki_www:/var/www/foswiki:z -e GC_LOG_OPTS='' -e SOLR_LOG_LEVEL='WARN' -p 8983:8983 -t solr:5
Testing Solr Index
Connect to foswiki container
Test the indexing
- cd /var/www/foswiki/tools
- ./solrindex Topic=WebHome
It should show you the files being indexed
Test the Search
- cd /var/www/foswiki/bin
- ./rest /SolrPlugin/search