Browse Source

upgrading Docker image to Solr latest

solr_update
Simon Bowie 2 years ago
parent
commit
392cd2ea09
3 changed files with 8 additions and 6 deletions
  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 View File



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 View File



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 View File

{ {
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…
Cancel
Save