diff --git a/Dockerfile b/Dockerfile index 0a28fb2..79aca7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ RUN python manage.py collectstatic --noinput ENV DJANGO_DEBUG_FALSE=1 +RUN python manage.py compress + RUN adduser --uid 1234 nonroot USER nonroot diff --git a/src/core/settings.py b/src/core/settings.py index 0de7b59..1c1a742 100644 --- a/src/core/settings.py +++ b/src/core/settings.py @@ -37,6 +37,7 @@ if 'DJANGO_DEBUG_FALSE' in os.environ: SECURE_HSTS_SECONDS = 60 SECURE_HSTS_INCLUDE_SUBDOMAINS = True SECURE_HSTS_PRELOAD = True + COMPRESS_OFFLINE = True else: DEBUG = True # SECURITY WARNING: keep the secret key used in production secret!