solr global

This commit is contained in:
Disassembler 2018-09-11 20:28:59 +02:00
parent e8354e59c9
commit fa70f85acb
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
4 changed files with 7 additions and 57 deletions

View File

@ -16,10 +16,14 @@ SCRIPT
addgroup -S -g 8983 solr
adduser -S -u 8983 -h /var/lib/solr -s /bin/false -g solr -G solr solr
chown -R solr:solr /opt/solr
# Make start/stop script visible globally (also defines directory for solr.in.sh)
ln -s /opt/solr/bin/solr /usr/bin/solr
RUN
COPY lxc
MOUNT /srv/solr/data var/lib/solr
USER 8983 8983
ENV HOME /var/lib/solr
CMD /opt/solr/bin/solr start -f
CMD /usr/bin/solr start -f

View File

@ -5,8 +5,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/setup
# Configure Solr
mkdir -p /srv/solr/data
cp ${SOURCE_DIR}/srv/solr/data/solr.xml /srv/solr/data/solr.xml
cp ${SOURCE_DIR}/srv/solr/data/.solr.in.sh /srv/solr/data/.solr.in.sh
cp /var/lib/lxc/solr/solr/opt/solr/server/solr/solr.xml /srv/solr/data/solr.xml
chown -R 8983:8983 /srv/solr/data
# Install service

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is an example of a simple "solr.xml" file for configuring one or
more Solr Cores, as well as allowing Cores to be added, removed, and
reloaded via HTTP requests.
More information about options available in this configuration file,
and Solr Core administration can be found online:
http://wiki.apache.org/solr/CoreAdmin
-->
<solr>
<solrcloud>
<str name="host">${host:}</str>
<int name="hostPort">${jetty.port:8983}</int>
<str name="hostContext">${hostContext:solr}</str>
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
<str name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str>
<str name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str>
</solrcloud>
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
<int name="socketTimeout">${socketTimeout:600000}</int>
<int name="connTimeout">${connTimeout:60000}</int>
</shardHandlerFactory>
</solr>