Spotter-VM/solr.sh

18 lines
435 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
chown -R 8983:8983 /srv/solr/data
# 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