Open jcomedouteau opened 1 year ago
I would even push for a fully-automated solution :
have the solr container detect at startup that the configuration was changed and then wipe the data dir with something like:
CMD ["/bin/sh", "-c", "
(
set -e
cd /etc/shanoir-core-template
for file in `find -type f` ; do
cmp -- "$file" "/var/solr/data/shanoir/$file"
done
) || (
echo 'deleting /var/solr/data (not up-to-date with the template), the index has to be rebuilt'
rm -rf /var/solr/data
)
exec solr-precreate shanoir /etc/shanoir-core-template
"]
have the datasets container make a solr query on at startup and trigger the indexing task if it detects that the index is empty.