Skip to content

Commit

Permalink
Add solr dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilPoposki98 committed Dec 17, 2024
1 parent e649088 commit 5e06649
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions compose/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ARG SOLR_VERSION

FROM solr:${SOLR_VERSION:-9}

EXPOSE 8983

ARG CKAN_BRANCH

ENV SOLR_CONFIG_DIR="/opt/solr/server/solr/configsets"
ENV SOLR_SCHEMA_FILE="$SOLR_CONFIG_DIR/ckan/conf/managed-schema"

USER root

# Create a CKAN configset by copying the default one
RUN cp -R $SOLR_CONFIG_DIR/_default $SOLR_CONFIG_DIR/ckan

# Update the schema
ADD https://raw.githubusercontent.com/ckan/ckan/$CKAN_BRANCH/ckan/config/solr/schema.xml $SOLR_SCHEMA_FILE
RUN chmod 644 $SOLR_SCHEMA_FILE

USER solr

CMD ["sh", "-c", "solr-precreate ckan $SOLR_CONFIG_DIR/ckan"]

0 comments on commit 5e06649

Please sign in to comment.