Skip to content

Commit

Permalink
Merge pull request #7 from vivo-project/solr-8.11
Browse files Browse the repository at this point in the history
Updates for solr 8.11
  • Loading branch information
wwelling authored Jul 18, 2024
2 parents ee8a55e + 38d186a commit 97b226b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM solr:7.7.3-slim
FROM solr:8.11

RUN chmod -R ugo+w /opt/solr/server/solr/
RUN chmod -R ugo+w /opt/solr/server/logs/
ARG CONFIGSET=vivocore
ENV CONFIGSET $CONFIGSET

USER root

COPY /vivocore/conf /opt/solr/server/solr/configsets/vivocore/conf

COPY setup.sh /setup.sh

USER root

RUN chown -R solr:solr /opt/solr/server/solr/configsets/vivocore
RUN chmod -R 755 /opt/solr/server/solr/configsets/vivocore
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Configuration and Installation instructions for VIVO's external Solr

## Requirements
This configuration has been tested with VIVO 1.11.0 and Solr 7.4.0
This configuration has been tested with VIVO 1.12.3 and Solr 8.11.0 and with Docker

When using Docker the Quick Start section below is not applicable

# Quick Start
1. Download and install Solr 7.4.0
Expand Down
13 changes: 6 additions & 7 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ fi

# allow easier reset core with `docker run -e RESET_CORE=true`
if [[ "$RESET_CORE" = "true" ]]; then
echo 'Removing core /opt/solr/server/solr/mycores/vivocore'
rm -rf /opt/solr/server/solr/mycores/vivocore
echo "Removing core /var/solr/data/$CONFIGSET"
rm -rf /var/solr/data/$CONFIGSET
fi

if [ ! -f "/opt/solr/server/solr/mycores/vivocore/core.properties" ]; then
if [ ! -f "/var/solr/data/$CONFIGSET/core.properties" ]; then
start-local-solr
solr create -c vivocore -d "/opt/solr/server/solr/configsets/vivocore" -p 8983
solr create -c $CONFIGSET -d "/opt/solr/server/solr/configsets/$CONFIGSET" -p 8983
stop-local-solr
mv "/opt/solr/server/solr/vivocore" /opt/solr/server/solr/mycores/
else
echo "vivocore collection already exists";
echo "$CONFIGSET collection already exists";
fi

exec solr-fg
exec solr -f

0 comments on commit 97b226b

Please sign in to comment.