Skip to content

Commit

Permalink
update to django 4.2.11
Browse files Browse the repository at this point in the history
this updates to use postgres 13 for the database in docker as 11 is no
longer supported by django 4.2. See below for update instructions.

Also updates django-bootstrap4 to a compatible version and adds
django-libsass.

To update your docker *before rebuilding* do:

docker-compose exec postgres pg_dumpall -U caps > dump.sql

Stop docker, docker rebuild and restart which will change the volume
used for postgres data.

docker-compose exec -T postgres psql -U caps < dump.sql

For other branches the existing postgres 11 volume will still remain
until you delete it.
  • Loading branch information
struan committed Apr 4, 2024
1 parent 6b3ee0c commit 582f769
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 21 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
environment:
- REPOSITORY_DB_PASS=${REPOSITORY_DB_PASS:-caps}
- SECRET_KEY=${SECRET_KEY:-xx}
- DEBUG=${DEBUG:-1}
- DEBUG=${DEBUG:-True}
- MAPIT_API_KEY=${MAPIT_API_KEY:-xxx}
- GOOGLE_ANALYTICS=${GOOGLE_ANALYTICS}
- GOOGLE_MEASUREMENT_PROTOCOL_SECRET=${GOOGLE_MEASUREMENT_PROTOCOL_SECRET}
Expand All @@ -43,9 +43,9 @@ services:
- 25:25

postgres:
image: postgres:11
image: postgres:13
volumes:
- postgres_data:/var/lib/postgresql/data/
- postgres_data_13:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${REPOSITORY_DB_USER:-caps}
- POSTGRES_PASSWORD=${REPOSITORY_DB_PASS:-caps}
Expand All @@ -66,5 +66,5 @@ services:
- 8983:8983

volumes:
postgres_data:
postgres_data_13:
solr_data:
157 changes: 142 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ chardet = "^3.0.4"
csscompressor = "^0.9.4"
defusedxml = "^0.6.0"
diff-match-patch = "^20200713"
Django = "^3.2.25"
django = "^4.2.11"
django-autoslug = "^1.9.7"
django-bootstrap4 = "^1.1.1"
django-bootstrap4 = "^24.1"
django-bootstrap5 = "^23.3"
django-filter = "^2.4.0"
django-haystack = "^3.0"
Expand Down Expand Up @@ -68,6 +68,7 @@ django-pipeline = {git = "https://github.com/mysociety/django-pipeline"}
django-pipeline-csscompressor = "^0.1"
django-hosts = "^6.0"
mailchimp-marketing = {git = "https://github.com/mailchimp/mailchimp-marketing-python.git"}
django-libsass = "^0.9"

[tool.poetry.group.dev.dependencies]
pylint = "^3.1.0"
Expand Down

0 comments on commit 582f769

Please sign in to comment.