I’m working on a docker setup using CommandBox and CFConfig for an existing app that makes use of Solr for indexing with Adobe ColdFusion 2018.
I know the official CF docker images make use of the addons image for setting up the Solr server.
I’m just wondering if anyone knows if this is a necessity or can I have the solr home directory point to a directory inside of the CommandBox container?
Admittedly, it’s been a very long time since I’ve used Solr, so I need to go back and read the docs on it to refresh my memory. But wanted to get some guidance on the best way to set it up with the CommandBox docker image.
I also noticed that there are no CFConfig settings for creating Solr collections. I’ll probably just have a CF script to create the collection on initial deployment, unless a setting does exist in CFConfig to have this done inside of the .cfconfig.json file.
I’m sure you could extend our base image and run the SOLR installer on it so it was local to the same container as CF. FWIW it’s more correct to have a separate container just so you can scale it separately. Adobe may have a silent installer you can use to automate this process, but I wouldn’t get your hopes up too high. Most of the silent installers are completely undocumented and don’t allow everything to be configured which makes it… not easy.
As far as CFConfig having no support for the SOLR settings, that’s basically because I’ve had no personal need for it, no one has asked me to add them, and no one has sent a pull to add them I would welcome their addition to CFConfig if you wanted to look at it. I don’t use SOLR so I’m not sure what settings exist, but I assume minimally, there is a setting somewhere that points to a host and port to connect to the SOLR service. I’d have to take a look to see what XML file is used to store the collections that are defined and how much data there is there.
Your answer is kind of what I was expecting. The reason I switched away from using the official CF Docker images to the Commandbox Docker image is because of the fantastic job you guys have done.
When I get some time, I will definitely look into getting the solr settings into CFConfig and do a PR to see if it’s something you want to pull into the official Module. Not that I think there is a dire need for it, but I’ll try to get to it sooner rather than later.