mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Solr 9 compatibility requires minor updates to how Solr image is initialized
This commit is contained in:
@@ -93,7 +93,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# Keep Solr data directory between reboots
|
# Keep Solr data directory between reboots
|
||||||
- solr_data:/var/solr/data
|
- solr_data:/var/solr/data
|
||||||
# Initialize all DSpace Solr cores using the mounted configsets (see above), then start Solr
|
# NOTE: We are not running Solr as "root", but we need root permissions to copy our cores to the mounted
|
||||||
|
# /var/solr/data directory. Then we start Solr as the "solr" user.
|
||||||
|
user: root
|
||||||
|
# Initialize all DSpace Solr cores, then start Solr
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- '-c'
|
- '-c'
|
||||||
@@ -111,7 +114,8 @@ services:
|
|||||||
cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent
|
cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent
|
||||||
precreate-core suggestion /opt/solr/server/solr/configsets/suggestion
|
precreate-core suggestion /opt/solr/server/solr/configsets/suggestion
|
||||||
cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion
|
cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion
|
||||||
exec solr -f
|
chown -R solr:solr /var/solr
|
||||||
|
runuser -u solr -- solr-foreground
|
||||||
volumes:
|
volumes:
|
||||||
assetstore:
|
assetstore:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
@@ -97,11 +97,16 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# Keep Solr data directory between reboots
|
# Keep Solr data directory between reboots
|
||||||
- solr_data:/var/solr/data
|
- solr_data:/var/solr/data
|
||||||
|
# NOTE: We are not running Solr as "root", but we need root permissions to copy our cores to the mounted
|
||||||
|
# /var/solr/data directory. Then we start Solr as the "solr" user.
|
||||||
|
user: root
|
||||||
# Initialize all DSpace Solr cores using the mounted local configsets (see above), then start Solr
|
# Initialize all DSpace Solr cores using the mounted local configsets (see above), then start Solr
|
||||||
# * First, run precreate-core to create the core (if it doesn't yet exist). If exists already, this is a no-op
|
# * First, run precreate-core to create the core (if it doesn't yet exist). If exists already, this is a no-op
|
||||||
# * Second, copy configsets to this core:
|
# * Second, copy configsets to this core:
|
||||||
# Updates to Solr configs require the container to be rebuilt/restarted:
|
# Updates to Solr configs require the container to be rebuilt/restarted:
|
||||||
# `docker compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --build dspacesolr`
|
# `docker compose -p d7 -f docker/docker-compose.yml -f docker/docker-compose-rest.yml up -d --build dspacesolr`
|
||||||
|
# * Third, ensure all new folders are owned by "solr" user
|
||||||
|
# * Finally, start Solr as the "solr" user via the provided solr-foreground script
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- '-c'
|
- '-c'
|
||||||
@@ -119,7 +124,8 @@ services:
|
|||||||
cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent
|
cp -r /opt/solr/server/solr/configsets/qaevent/* qaevent
|
||||||
precreate-core suggestion /opt/solr/server/solr/configsets/suggestion
|
precreate-core suggestion /opt/solr/server/solr/configsets/suggestion
|
||||||
cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion
|
cp -r /opt/solr/server/solr/configsets/suggestion/* suggestion
|
||||||
exec solr -f
|
chown -R solr:solr /var/solr
|
||||||
|
runuser -u solr -- solr-foreground
|
||||||
volumes:
|
volumes:
|
||||||
assetstore:
|
assetstore:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
Reference in New Issue
Block a user