Use postgres for project db

This commit is contained in:
Jake Howard 2022-07-28 20:41:30 +01:00
parent d995b412a0
commit ed039ce6ed
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 18 additions and 4 deletions

3
.gitignore vendored
View file

@ -305,6 +305,3 @@ cython_debug/
/collected-static /collected-static
media/ media/
# Redis
dump.rdb

View file

@ -68,10 +68,14 @@ container:
- static - static
test_python: test_python:
<<: *python_test_template services:
- postgres:13-alpine
variables:
DATABASE_URL: postgres://postgres@postgres/postgres
script: script:
- ./manage.py collectstatic --noinput --clear - ./manage.py collectstatic --noinput --clear
- ./manage.py test - ./manage.py test
<<: *python_test_template
django_checks: django_checks:
<<: *python_test_template <<: *python_test_template

View file

@ -8,10 +8,20 @@ services:
- QUEUE_STORE_URL=redis://redis/0 - QUEUE_STORE_URL=redis://redis/0
- DEBUG=true - DEBUG=true
- SECRET_KEY=super-secret-key - SECRET_KEY=super-secret-key
- DATABASE_URL=postgres://website:website@db/website
volumes: volumes:
- ../../:/app - ../../:/app
depends_on: depends_on:
- redis - redis
- db
redis: redis:
image: redis:6.0 image: redis:6.0
db:
image: postgres:13-alpine
environment:
- POSTGRES_PASSWORD=website
- POSTGRES_USER=website
volumes:
- ./volumes/db:/var/lib/postgresql/data

View file

@ -12,3 +12,4 @@ django-rq
django-redis django-redis
wagtail-draftail-snippet wagtail-draftail-snippet
gunicorn gunicorn
psycopg2

View file

@ -34,6 +34,7 @@ more-itertools==8.13.0 # via -r requirements/base.in
openpyxl==3.0.10 # via tablib openpyxl==3.0.10 # via tablib
packaging==21.3 # via redis packaging==21.3 # via redis
pillow==9.2.0 # via wagtail pillow==9.2.0 # via wagtail
psycopg2==2.9.3 # via -r requirements/base.in
pygments==2.12.0 # via -r requirements/base.in pygments==2.12.0 # via -r requirements/base.in
pyparsing==3.0.9 # via packaging pyparsing==3.0.9 # via packaging
pytz==2022.1 # via django-modelcluster, djangorestframework, l18n pytz==2022.1 # via django-modelcluster, djangorestframework, l18n

View file

@ -48,6 +48,7 @@ pep517==0.12.0 # via build
pillow==9.2.0 # via -r requirements/base.txt, wagtail pillow==9.2.0 # via -r requirements/base.txt, wagtail
pip-tools==6.8.0 # via -r requirements/dev.in pip-tools==6.8.0 # via -r requirements/dev.in
platformdirs==2.5.2 # via black platformdirs==2.5.2 # via black
psycopg2==2.9.3 # via -r requirements/base.txt
pycodestyle==2.8.0 # via flake8 pycodestyle==2.8.0 # via flake8
pyflakes==2.4.0 # via flake8 pyflakes==2.4.0 # via flake8
pygments==2.12.0 # via -r requirements/base.txt pygments==2.12.0 # via -r requirements/base.txt