瀏覽代碼

upgrading Docker image to Solr latest

solr_update
Simon Bowie 3 年之前
父節點
當前提交
392cd2ea09
共有 3 個檔案被更改,包括 8 行新增6 行删除
  1. +1
    -1
      docker-compose.prod.yml
  2. +1
    -1
      docker-compose.yml
  3. +6
    -4
      solr_import.sh

+ 1
- 1
docker-compose.prod.yml 查看文件



solr: solr:
container_name: solr container_name: solr
image: solr:8.11.1
image: solr:latest
ports: ports:
- '8983:8983' - '8983:8983'
volumes: volumes:

+ 1
- 1
docker-compose.yml 查看文件



solr: solr:
container_name: solr container_name: solr
image: solr:8.11.1
image: solr:latest
ports: ports:
- '8983:8983' - '8983:8983'
volumes: volumes:

+ 6
- 4
solr_import.sh 查看文件

{ {
docker exec -it solr bin/solr delete -c $core docker exec -it solr bin/solr delete -c $core


docker exec -it solr solr create_core -c $core -d custom
#docker exec -it solr solr create_core -c $core -d custom
docker exec -it solr solr create_core -c $core


#docker exec -ti --user=solr solr bash -c "cp -r /opt/solr/example/files/conf/* /var/solr/data/$core/conf/" #docker exec -ti --user=solr solr bash -c "cp -r /opt/solr/example/files/conf/* /var/solr/data/$core/conf/"




sleep 30 sleep 30


docker run --rm -v "$directory/$location:/$core" --network=host solr:8.11.1 post -c $core /$core
docker run --rm -v "$directory/$location:/$core" --network=host solr:latest post -c $core /$core
} }


Import_recursive() Import_recursive()
{ {
docker run --rm -v "$directory/$subdirectory:/$core" --network=host solr:8.11.1 post -c $core /$core
docker run --rm -v "$directory/$subdirectory:/$core" --network=host solr:latest post -c $core /$core
} }
############################################################ ############################################################
############################################################ ############################################################
z) # index all z) # index all
core="all" core="all"
docker exec -it solr bin/solr delete -c $core docker exec -it solr bin/solr delete -c $core
docker exec -it solr solr create_core -c $core -d custom
#docker exec -it solr solr create_core -c $core -d custom
docker exec -it solr solr create_core -c $core
location="data/POP_Dataset_2022" location="data/POP_Dataset_2022"
for subdirectory in $location/*/ for subdirectory in $location/*/
do do

Loading…
取消
儲存