This project uses docker-compose to build one or more Solr search cores from data retrieved from a Microsoft SQL Server backup.
Run the build script to build an example solr server container:
./build.sh
To test the server we will run the resulting container the server of which will be available at http://localhost:8983.
docker run --rm -it -p 8983:8983 solr-container
The heart of this process lives in the docker-compose.yaml which follows these steps:
mssql
gets the Microsoft SQL Server container and waits for it to be available- The version comes from the
.env
file - This step operates in parallel with the
solr
step
- The version comes from the
solr
gets the Solr server container and waits for it to be available- The version comes from the
.env
file - This step operates in parallel with the
mssql
step
- The version comes from the
step1_restore_db
restores the backed up MSSQL database file- In the example it comes from
example/data/solr_export.bak
- All other steps wait for this to complete
- In the example it comes from
- The remaining
load_core
steps perform the actual data load from SQL to Solr- Both these steps and the restore_db are the ones you want to modify for your project
build.sh
wraps teh docker compose process and adds building the final container.
- Fork this repo
- Create your own cores and data (use the example folder as a base)
- Edit
core.properties
to name your core - Edit
conf/data-config.xml
to modify the data load parameters
- Edit
- Edit the
docker-compose.yaml
to make sure your core(s) load- The
&load_core
and<<: *load_core
statements help make the yaml easier to read by performing a "copy & paste" operation that allows for modification.
- The