diff --git a/app/Dockerfile b/app/Dockerfile index d04be21..cf8c51c 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -11,7 +11,8 @@ RUN apt-get update && \ git \ wget \ unzip \ - default-jdk && \ + default-jdk \ + xmlstarlet && \ rm -rf /var/lib/apt/lists/* # Install Archives Space @@ -26,6 +27,17 @@ RUN if [ "$ASPACE_VERSION" = "latest" ]; then \ unzip -q /archivesspace-$ARCHIVESSPACE_VERSION.zip -d / && \ mv /archivesspace/config/config.rb /archivesspace/config/config-$ARCHIVESSPACE_VERSION.rb +# indexConfig/lockType is set to single in solrconfig.xml to prevent issues that occur with +# file-based locks when Solr exits improperly. +# lockType cannot be set via SOLR_OPTS because an indexConfig variable is not provided in +# the ArchivesSpace release's configuration. +# This change also needs to be made in the app image because the application compares +# the checksums of its and Solr's configuration files. +RUN xmlstarlet edit --inplace \ + --subnode "/config" --type elem -n indexConfig \ + --subnode "/config/indexConfig" --type elem -n lockType --value "\${solr.lock.type:single}" \ + /archivesspace/solr/solrconfig.xml + # Install Java MySQL Connector RUN wget -q https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.30/mysql-connector-java-8.0.30.jar && \ cp /mysql-connector-java-8.0.30.jar /archivesspace/lib/ diff --git a/solr/Dockerfile b/solr/Dockerfile index 8632f4e..92aa681 100644 --- a/solr/Dockerfile +++ b/solr/Dockerfile @@ -10,7 +10,8 @@ RUN apt-get update && \ ca-certificates \ git \ wget \ - unzip + unzip \ + xmlstarlet # Install Archives Space RUN if [ "$ASPACE_VERSION" = "latest" ]; then \ @@ -23,6 +24,15 @@ RUN if [ "$ASPACE_VERSION" = "latest" ]; then \ wget -q https://github.com/archivesspace/archivesspace/releases/download/$ARCHIVESSPACE_VERSION/archivesspace-$ARCHIVESSPACE_VERSION.zip && \ unzip -q /archivesspace-$ARCHIVESSPACE_VERSION.zip -d / +# indexConfig/lockType is set to single in solrconfig.xml to prevent issues that occur with +# file-based locks when Solr exits improperly. +# lockType cannot be set via SOLR_OPTS because an indexConfig variable is not provided in +# the ArchivesSpace release's configuration. +RUN xmlstarlet edit --inplace \ + --subnode "/config" --type elem -n indexConfig \ + --subnode "/config/indexConfig" --type elem -n lockType --value "\${solr.lock.type:single}" \ + /archivesspace/solr/solrconfig.xml + # List Archives Space Solr Conf Files RUN ls -l /archivesspace/solr