diff --git a/docker.sh b/docker.sh index 0a8c49d..ff42d34 100755 --- a/docker.sh +++ b/docker.sh @@ -1,3 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash -docker run -p 8983:8983 -v $(PWD)/solr_home:/opt/mysolrhome -e SOLR_HOME=/opt/mysolrhome -e INIT_SOLR_HOME=yes solr:8.4.1 +if [ "$(uname -s)" == 'Linux' ]; then + # necessary on Linux according to https://github.com/docker-solr/docker-solr/blob/master/README.md + # docker does volume mount as solr user, which has usually no permissions on the host system + sudo chown -R 8983:8983 solr_home +fi + +docker run -p 8983:8983 -v "${PWD}/solr_home:/opt/mysolrhome" -e SOLR_HOME=/opt/mysolrhome -e INIT_SOLR_HOME=yes solr:8.4.1 diff --git a/index.sh b/index.sh index 54ae880..b5c90f8 100755 --- a/index.sh +++ b/index.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ ! -f ./tmdb_solr.json ]; then unzip tmdb_solr.json.zip fi