To implement schema customizations for Solr in your project look to how Lagoon creates our standard images.
- In the
solrsection of your docker-compose file replace
build: context: . dockerfile: Dockerfile.solr
- Place your schema files in your code repository, we typically like to use
- Create a Dockerfile.solr
FROM amazeeio/solr:6.6 COPY .lagoon/solr /solr-conf/conf RUN precreate-core drupal /solr-conf CMD ["solr-foreground"]
The goal is to have your solr configuration files exist at
/solr-conf/conf in the image you are building.
To implement multiple cores, you will also need to ship your own solr schema as above, the only change needed is to the
CMD of the Dockerfile, repeat the pattern of
precreate-core corename /solr-conf/ ; for each core you require.
FROM amazeeio/solr:6.6-drupal RUN precreate-core drupal-index1 /solr-conf && \ precreate-core drupal-index2 /solr-conf && \ precreate-core drupal-index3 /solr-conf CMD ["solr-foreground"]