Skip to content

Commit

Permalink
Merge pull request #80 from HCDigitalScholarship/solr
Browse files Browse the repository at this point in the history
Improve the solr situation
  • Loading branch information
alexgleason authored Aug 18, 2023
2 parents 1993283 + a58e17c commit f18fa7f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
15 changes: 0 additions & 15 deletions QI/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,5 @@

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/


HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': "http://127.0.0.1:8984/solr/QIcore",
'ADMIN_URL': 'http://127.0.0.1:8984/solr/admin/cores',
# ...or for multicore...
# 'URL': 'http://127.0.0.1:8984/solr/mysite',
},
}

HAYSTACK_SEARCH_RESULTS_PER_PAGE = 100

9 changes: 8 additions & 1 deletion QI/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@

ALLOWED_HOSTS = ['*']

SECRET_KEY = os.environ.get('SECRET_KEY')
SECRET_KEY = os.environ.get('SECRET_KEY')

HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': os.environ.get('SOLR_URL'),
},
}
14 changes: 13 additions & 1 deletion compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@ services:
ports:
- "8000:8000"
environment:
- SECRET_KEY=1
- SECRET_KEY=1
- SOLR_URL=http://solr:8983/solr/pennstreaty
depends_on:
- solr
solr:
image: solr:9.3
ports:
- "8983:8983"
volumes:
- data:/var/solr
command: solr-precreate pennstreaty
volumes:
data:

0 comments on commit f18fa7f

Please sign in to comment.