Spotter-VM/solr.sh

17 lines
401 B
Bash
Executable File

#!/bin/bash
SOURCE_DIR=$(realpath $(dirname "${0}"))/solr
# Build Docker container
docker build -t solr ${SOURCE_DIR}
# Configure Solr
mkdir -p /srv/solr/data
cp ${SOURCE_DIR}/srv/solr/data/solr.xml /srv/solr/data/solr.xml
# Configure Solr service
cp ${SOURCE_DIR}/lib/systemd/system/solr.service /lib/systemd/system/solr.service
systemctl daemon-reload
systemctl enable solr
systemctl start solr