-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #370 from govCMS/update-dockerfile-solr
[GOVCMSD10-361] Update Dockerfile.solr
- Loading branch information
Showing
2 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/bash | ||
|
||
# Prepare the index. | ||
# | ||
# If the release requires a configset update then an | ||
# environment variable needs to be present, this will | ||
# recreate the solr core otherwise the core will be | ||
# precreated (or skipped if it exists). | ||
|
||
INDEX="${INDEX:-drupal}" | ||
CONFIGSET="${CONFIGSET:-/opt/solr/server/solr/configsets/drupal}" | ||
|
||
# The following scripts are provided by the base images. | ||
if [ -n "$GOVCMS_SOLR_RECREATE" ]; then | ||
# solr-recreate will remove the index data and configuration | ||
# and rebuild from the configset provided. | ||
solr-recreate "$INDEX" "$CONFIGSET" | ||
else | ||
# solr-precreate will initialise the solr data/conf directories | ||
# if they exist on disk, this will skip. | ||
solr-precreate "$INDEX" "$CONFIGSET" | ||
fi |