Enable and configure Solr¶
This section will guide you through getting Solr integrated into the Devilbox.
Table of Contents
The Devilbox ships various example configurations to overwrite the default stack. Those files are
compose/ in the Devilbox git directory.
docker-compose.override.yml-all has all examples combined in one file for easy copy/paste.
However, each example also exists in its standalone file as shown below:
host> tree -L 1 compose/ compose/ ├── docker-compose.override.yml-all ├── docker-compose.override.yml-blackfire ├── docker-compose.override.yml-mailhog ├── docker-compose.override.yml-rabbitmq ├── docker-compose.override.yml-solr └── README.md 0 directories, 6 files
In case of Solr, the file is
compose/docker-compose.override.yml-solr. This file
must be copied into the root of the Devilbox git directory.
|What||How and where|
|Example compose file||
|Container IP address||
|Container host name||
Additionally the following
.env variables can be created for easy configuration:
||Controls the host port on which Solr API and WebUIwill be available at.|
||Controls the Solr version to use.|
||Default Solr core name|
Copy the Solr Docker Compose overwrite file into the root of the Devilbox git directory.
(It must be at the same level as the default
host> cp compose/docker-compose.override.yml-solr docker-compose.override.yml
Solr is using sane defaults, which can be changed by adding variables to the
and assigning custom values.
Add the following variables to
.env and adjust them to your needs:
# Solr version to choose #SOLR_SERVER=5 #SOLR_SERVER=6 #SOLR_SERVER=7 SOLR_SERVER=latest SOLR_CORE_NAME=devilbox HOST_PORT_SOLR=8983
For the lazy readers, here are all commands required to get you started. Simply copy and paste the following block into your terminal from the root of your Devilbox git directory:
# Copy compose-override.yml into place cp compose/docker-compose.override.yml-solr docker-compose.override.yml # Create .env variable echo "# Solr version to choose" >> .env echo "#SOLR_SERVER=5" >> .env echo "#SOLR_SERVER=6" >> .env echo "#SOLR_SERVER=7" >> .env echo "SOLR_SERVER=latest" >> .env echo "SOLR_CORE_NAME=devilbox" >> .env echo "HOST_PORT_SOLR=8983" >> .env # Start container docker-compose up -d php httpd bind solr