Skip to content

Commit

Permalink
Try solr as docker run
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Aug 29, 2024
1 parent 198e3ef commit 8b78ebb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- /tmp/boxc_test_storage:/tmp/boxc_test_storage
env:
CATALINA_OPTS: "-Djava.awt.headless=true -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -Dfcrepo.external.content.allowed=/config/allowed_external_paths.txt"
solr:
image: solr:9
ports:
- "48983:8983"
volumes:
- /tmp/solr-config:/solr_config
# solr:
# image: solr:9
# ports:
# - "48983:8983"
# volumes:
# - /tmp/solr-config:/solr_config

steps:
- name: Change permissions of /tmp/boxc_test_storage
Expand Down Expand Up @@ -60,16 +60,20 @@ jobs:
- name: Change permissions of /tmp/solr-config
run: sudo chmod -R 2777 /tmp/solr-config

- name: Run solr container as command to trigger core creation
run: |
docker run -v /tmp/solr-config:/solr_config -d --rm -p 48983:8983 solr:9 solr-precreate access /solr_config/config
- name: Wait for Solr to start
run: |
until curl -s http://localhost:48983/solr; do
echo "Waiting for Solr to start..."
sleep 5
done
- name: Create Solr Core
run: curl "http://localhost:48983/solr/admin/cores?action=CREATE&name=access&instanceDir=/solr_config/config&config=solrconfig.xml&schema=schema.xml"

#
# - name: Create Solr Core
# run: curl "http://localhost:48983/solr/admin/cores?action=CREATE&name=access&instanceDir=/solr_config/config&config=solrconfig.xml&schema=schema.xml"
#
- name: Probe Solr core
run: curl -s "http://localhost:48983/solr/access/select?q=*"
#
Expand Down
File renamed without changes.

0 comments on commit 8b78ebb

Please sign in to comment.