Solr for Digital Collections
- Download Docker Desktop and log in
If this is your first time working in this repo, build the base service (dependencies, etc. that don't change)
docker-compose build
If this is your first time working in this repo or the Dockerfile has been updated you will need to (re)build your services
- Push to the git repository
- Set the environment variable for the tag to the git commit
export SOLR_TAG=$(git rev-parse --short HEAD)
& build your image based on the docker-compose file
docker-compose build
- If appropriate, push the tagged image to the Dockerhub repository
docker-compose push
-
Start the solr service
docker-compose up
- Access the solr instance at
http://localhost:8983
- Access the solr instance at
Build the image as noted, tag with new version.
docker tag <whatever image id> yalelibraryit/dc-solr:v1.0.1
Push newly tagged image to dockerhub
docker push yalelibraryit/dc-solr:v1.0.1
Tag the release in github, and update the .env in camerata.
Since Solr is a stateful application, announce deployment in the appropriate channels, as deployment will require some down-time.
- Stop the solr service
docker-compose down
Use the following fragment in the docker-compose.yml for the application.
services:
solr:
image: yalelibraryit/dc-solr:${SOLR_TAG:-latest}
ports:
- '8983:8983'
volumes:
- solr:/opt/solr/server/solr/mycores
env_file:
- .env
command: bash -c 'precreate-core ${SOLR_CORE} /opt/config; precreate-core ${SOLR_TEST_CORE} /opt/config; exec solr -f'
volumes:
solr:
Note, two environment variables are required. Add these to the .env
file.
SOLR_TEST_CORE=blacklight-test
SOLR_CORE=blacklight-development