Skip to content

Commit

Permalink
Merge pull request #372 from jhu-idc/add_solr_refresh
Browse files Browse the repository at this point in the history
Force Solr to pull all updates and restart Solr
  • Loading branch information
DonRichards authored Feb 20, 2023
2 parents b1ae781 + d23f425 commit 4696dd3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion idc.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,21 @@ start:
docker ps -a
for i in $$( docker ps -a | grep drupal | awk '{print $$1}' ) ; do echo $$i ; docker inspect "$$i" | grep Image ; done
echo "Force solr ISLANDORA config"
#docker-compose exec -T drupal bash -c '/bin/rm -f /opt/solr/server/solr/ISLANDORA/conf/solrconfig_extra.xml ; /bin/cp -f /var/www/drupal/assets/solr/solrconfig_extra.xml /opt/solr/server/solr/ISLANDORA/conf/solrconfig_extra.xml'
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-solr:install-missing-fieldtypes"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-solr:get-server-config default_solr_server /var/www/drupal/solrconfig.zip"
docker-compose exec -T drupal with-contenv bash -lc "unzip /var/www/drupal/solrconfig.zip -d /opt/solr/server/solr/ISLANDORA/conf/ -o"
docker-compose exec -T drupal bash -c '/bin/rm -f /opt/solr/server/solr/ISLANDORA/conf/solrconfig_extra.xml ; /bin/cp -f /var/www/drupal/assets/solr/solrconfig_extra.xml /opt/solr/server/solr/ISLANDORA/conf/solrconfig_extra.xml'
echo "Restarting solr"
docker-compose restart solr
docker-compose exec -T drupal with-contenv bash -lc "drush cr"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:clear"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:disable-all"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:enable-all"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-solr:finalize-index --force"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-reindex"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-index"


.PHONY: _docker-up-and-wait
.SILENT: _docker-up-and-wait
Expand Down Expand Up @@ -338,4 +350,4 @@ theme-compile:
echo "Building theme"
docker run --rm -v $(shell pwd)/codebase/web/themes/contrib/idc-ui-theme/:/usr/src/project idc_theme_build bash -c "cd js && bash autobuild.sh"
sudo find ./codebase/web/themes/contrib/idc-ui-theme/js -exec chown $(shell id -u):101 {} \;
docker-compose exec -T drupal bash -lc "drush cc theme-registry"
docker-compose exec -T drupal bash -lc "drush cc theme-registry"

0 comments on commit 4696dd3

Please sign in to comment.