From b53c0b9849ff4c8e34ffeb8197e6ed3d907cfd13 Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Mon, 2 Mar 2026 16:02:47 -0500 Subject: [PATCH] small compress fixes to help serve scss on staging server and avoid persistent 500 errors --- Dockerfile | 2 ++ src/core/settings.py | 1 + 2 files changed, 3 insertions(+) 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!