add mssql support for solr (#1829)

This commit is contained in:
Rex.Chien 2018-11-13 20:58:00 +08:00 committed by Shao Yu-Lung (Allen)
parent 0af2115658
commit cf46b87a01
3 changed files with 12 additions and 0 deletions

View File

@ -706,6 +706,7 @@ services:
args:
- SOLR_VERSION=${SOLR_VERSION}
- SOLR_DATAIMPORTHANDLER_MYSQL=${SOLR_DATAIMPORTHANDLER_MYSQL}
- SOLR_DATAIMPORTHANDLER_MSSQL=${SOLR_DATAIMPORTHANDLER_MSSQL}
volumes:
- ${DATA_PATH_HOST}/solr:/opt/solr/server/solr/mycores
ports:

View File

@ -486,6 +486,7 @@ TC_AWS_STORE_METADATA=False
SOLR_VERSION=5.5
SOLR_PORT=8983
SOLR_DATAIMPORTHANDLER_MYSQL=false
SOLR_DATAIMPORTHANDLER_MSSQL=false
### GITLAB ###############################################
GITLAB_HOST_HTTP_PORT=8989

View File

@ -12,3 +12,13 @@ RUN if [ ${SOLR_DATAIMPORTHANDLER_MYSQL} = true ]; then \
&& rm /tmp/mysql_connector.tar.gz \
;fi
ARG SOLR_DATAIMPORTHANDLER_MSSQL=false
ENV SOLR_DATAIMPORTHANDLER_MSSQL ${SOLR_DATAIMPORTHANDLER_MSSQL}
# download mssql connector for dataimporthandler
RUN if [ ${SOLR_DATAIMPORTHANDLER_MSSQL} = true ]; then \
curl -L -o /tmp/mssql-jdbc-7.0.0.jre8.jar "https://github.com/Microsoft/mssql-jdbc/releases/download/v7.0.0/mssql-jdbc-7.0.0.jre8.jar" \
&& mkdir /opt/solr/contrib/dataimporthandler/lib \
&& mv /tmp/mssql-jdbc-7.0.0.jre8.jar "/opt/solr/contrib/dataimporthandler/lib/mssql-jdbc-7.0.0.jre8.jar" \
;fi