This commit is contained in:
Stefan Hardegger
2025-09-22 10:13:49 +02:00
parent 87f37567fb
commit f61be90d5c
2 changed files with 39 additions and 18 deletions

View File

@@ -68,7 +68,9 @@ services:
solr:
image: solr:9.9.0
build:
context: .
dockerfile: solr.Dockerfile
ports:
- "8983:8983" # Expose Solr Admin UI for development
environment:
@@ -76,23 +78,6 @@ services:
- SOLR_JAVA_MEM=-Xms256m -Xmx512m
volumes:
- solr_data:/var/solr
- ./solr/stories:/opt/solr-9.9.0/server/solr/configsets/storycove_stories
- ./solr/authors:/opt/solr-9.9.0/server/solr/configsets/storycove_authors
command: >
sh -c "
echo 'Starting Solr...' &&
solr start -f &
SOLR_PID=$$! &&
echo 'Waiting for Solr to be ready...' &&
sleep 15 &&
echo 'Creating cores...' &&
(solr create_core -c storycove_stories -d storycove_stories || echo 'Stories core already exists') &&
echo 'Stories core ready' &&
(solr create_core -c storycove_authors -d storycove_authors || echo 'Authors core already exists') &&
echo 'Authors core ready' &&
echo 'Both cores are available' &&
wait $$SOLR_PID
"
deploy:
resources:
limits: