-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e649088
commit 5e06649
Showing
1 changed file
with
23 additions
and
0 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
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"] |