diff --git a/admin/configure b/admin/configure index e241c5cb..539a6c85 100755 --- a/admin/configure +++ b/admin/configure @@ -204,6 +204,21 @@ case "$1" in # Write to .env touch .env sed -i.bak -e '/^COMPOSE_FILE=/d' .env && rm -f .env.bak + if [[ $OS == Windows_NT ]] + then + # Optional but convenient to copy/paste paths from file explorer + # https://docs.docker.com/compose/reference/envvars/#compose_convert_windows_paths + if ! grep -q '^COMPOSE_CONVERT_WINDOWS_PATHS=' "$MB_DOCKER_ROOT/.env" + then + echo 'COMPOSE_CONVERT_WINDOWS_PATHS=1' >> .env + fi + # Mandatory to keep this script working + # https://docs.docker.com/compose/reference/envvars/#compose_path_separator + if ! grep -q '^COMPOSE_PATH_SEPARATOR=:$' "$MB_DOCKER_ROOT/.env" + then + echo 'COMPOSE_PATH_SEPARATOR=:' >> .env + fi + fi echo "COMPOSE_FILE=$(IFS=:; echo "${compose_files[*]}")" >> .env echo "Successfully set/updated COMPOSE_FILE in '$MB_DOCKER_ROOT/.env'." exit 0 # EX_OK diff --git a/admin/lib/common.inc.bash b/admin/lib/common.inc.bash index db7eb4ee..ec5bc072 100644 --- a/admin/lib/common.inc.bash +++ b/admin/lib/common.inc.bash @@ -35,9 +35,16 @@ then fi ;; *) - echo >&2 "$SCRIPT_NAME: cannot detect platform to set docker command" - echo >&2 "Try setting the variable \$DOCKER_CMD appropriately" - exit 71 # EX_OSERR + case "$OS" in + Windows_NT) + DOCKER_CMD='docker' + ;; + *) + echo >&2 "$SCRIPT_NAME: cannot detect platform to set docker command" + echo >&2 "Try setting the variable \$DOCKER_CMD appropriately" + exit 71 # EX_OSERR + ;; + esac ;; esac fi @@ -63,9 +70,16 @@ then fi ;; *) - echo >&2 "$SCRIPT_NAME: cannot detect platform to set docker-compose command" - echo >&2 "Try setting the variable \$DOCKER_COMPOSE_CMD appropriately" - exit 71 # EX_OSERR + case "$OS" in + Windows_NT) + DOCKER_COMPOSE_CMD='docker-compose' + ;; + *) + echo >&2 "$SCRIPT_NAME: cannot detect platform to set docker-compose command" + echo >&2 "Try setting the variable \$DOCKER_COMPOSE_CMD appropriately" + exit 71 # EX_OSERR + ;; + esac ;; esac fi diff --git a/build/solr/scripts/load-search-indexes.sh b/build/solr/scripts/load-search-indexes.sh index d4b30bea..8b55282e 100755 --- a/build/solr/scripts/load-search-indexes.sh +++ b/build/solr/scripts/load-search-indexes.sh @@ -3,7 +3,7 @@ set -e -o pipefail -u DUMP_DIR=/media/searchdump -DATA_DIR=/opt/solr/server/solr/data +DATA_DIR=/var/solr/data/data OVERWRITE_FLAG=0 SCRIPT_NAME=$(basename "$0") diff --git a/docker-compose.yml b/docker-compose.yml index 18ad4ece..72e826f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -101,7 +101,7 @@ services: expose: - "8983" volumes: - - solrdata:/opt/solr/server/solr/data + - solrdata:/var/solr/data/data - searchdump:/media/searchdump mq: