Skip to content

Commit

Permalink
Turn on offline django-compressor
Browse files Browse the repository at this point in the history
We need to generate a consistent hash because django-compressor is
stupid.
  • Loading branch information
frankwiles committed Aug 28, 2024
1 parent dc1bc40 commit 261079b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ COPY justfile /code/
RUN pip install pytest-github-report
RUN python -m zipfile -e /code/data/nuremberg_prod_dump_latest.sqlite3.zip /tmp

RUN ./manage.py compress
RUN ./manage.py collectstatic; chmod -R 777 /code/static
RUN ./manage.py migrate

Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nameOverride: ""

fullnameOverride: hlsnp

replicaCount: 1
replicaCount: 3

initCommands:
- name: migrate
Expand Down
3 changes: 3 additions & 0 deletions web/nuremberg/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@

COMPRESS_STORAGE = 'compressor.storage.GzipCompressorFileStorage'

COMPRESS_OFFLINE = True

# whitenoise settings
# https://warehouse.python.org/project/whitenoise/

Expand Down Expand Up @@ -244,6 +246,7 @@
SECRET_KEY = 'supersecret'
DEBUG = True
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = False

CACHES = {
'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}
Expand Down

0 comments on commit 261079b

Please sign in to comment.