Set up a Solr 5.x instance in Docker, automatically configured with search_api_solr's settings.
50K+
Set up a Solr 4.x instance in Docker, automatically configured with search_api_solr's settings.
git clone --recursive [email protected]:mparker17/docker-solr-search_api_solr.gitFile -> Open Docker Command Line Terminal and run the next command in the new terminal window, otherwise you'll get an error.cd docker-solr-search_api_solr ; docker build -t solr-search_api_solr .docker run -P -d solr-search_api_solrSettings -> Ports and looking at the Mac Port column. Note that clicking the link will (currently) bring you to a 404 page, because Kitematic doesn't know to add /solr/ to the URL.docker inspect --format='{{.NetworkSettings}}' $INSTANCE_ID192.168.99.100)34567)/solr/collection1You can also access the Solr web interface by going to http://ip:port/solr (e.g.: http://192.168.99.100:34567/solr/).
Solr automatically sets up a collection for you named collection1. If you want, you can add new collections from the Solr web interface, but I recommend starting a new container for a different project (e.g.: follow the usage steps again). Multiple containers can run simultaneously, they just get different port numbers.
If you delete a container, it's configuration and data will be deleted along with it! If using this on a production environment, make sure to set up Volumes and/or run containers to back up the data.
If you restart your computer or Kitematic, the port assigned to a container might change. If this happens, Search API will complain that it can't connect to the Solr instance. You'll have to go into the Search API server settings and change the port that way, or use the Search API Override module to put the settings in settings[.local].php, to make them easier to change:
// Search API Override module.
$conf['search_api_override_mode'] = 'load';
$conf['search_api_override_servers'][$server_machine_name]['options'] = array(
'host' => '192.168.99.100',
'port' => '34567',
'path' => '/solr/collection1',
);
Content type
Image
Digest
sha256:40bff8c9c…
Size
351.1 MB
Last updated
over 7 years ago
docker pull mparker17/solr-search-api-solr