Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Solr to Lando with a script to fetch the latest Solr config #93

Merged
merged 3 commits into from
Oct 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't hardcode list of Solr servers in config update script
  • Loading branch information
stephen-cox committed Oct 19, 2022
commit c7394272bdd3b2dbc480977966f065bea2961841
12 changes: 7 additions & 5 deletions .lando/update-solr-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
# Update Lando Solr config.
##

# List of Solr servers to fetch config for.
export SERVERS=( localgov_sitewide_solr )

for SERVER in "${SERVERS[@]}"; do
for SERVER in `drush search-api:server-list --field=ID | grep solr`; do
echo "Fetching Solr config for ${SERVER}."
mkdir -p ".lando/solr/${SERVER}"
drush search-api-solr:get-server-config ${SERVER} "/tmp/${SERVER}.zip"
unzip -qo "/tmp/${SERVER}.zip" -d ".lando/solr/${SERVER}"
rm "/tmp/${SERVER}.zip"
UPDATED=true
done

echo "
if [ "$UPDATED" = true ]; then
echo "
For the new Solr config to be recognized you must restart Lando."
else
echo "No Solr servers found."
fi