Skip to content

Commit

Permalink
Setup postgres database
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleason committed Sep 15, 2023
1 parent aa68563 commit 46c8e90
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions QI/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@

HAYSTACK_SEARCH_RESULTS_PER_PAGE = 100

DATABASES = {}
5 changes: 5 additions & 0 deletions QI/settings_docker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import dj_database_url

from .settings import *

Expand All @@ -8,6 +9,10 @@

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

DATABASES['default'] = dj_database_url.config(
default='postgres://postgres:pennstreaty@db:5432/postgres'
)

HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
Expand Down
9 changes: 9 additions & 0 deletions compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ services:
- SECRET_KEY=1
- SOLR_URL=http://solr:8983/solr/pennstreaty
depends_on:
- db
- solr
db:
image: postgres:15
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pennstreaty
solr:
image: solr:9.3
ports:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ certifi==2018.4.16
chardet==3.0.4
click==3.3
diff-match-patch==20121119
dj-database-url
Django==2.0.6
django-autocomplete-light==3.4.0
django-ckeditor==5.7.1
Expand Down

0 comments on commit 46c8e90

Please sign in to comment.