diff --git a/Dockerfile b/Dockerfile index 5dd491d2..4c7c1024 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,8 @@ COPY solr_conf /code/solr_conf RUN touch /code/nuremberg/__init__.py; \ chown 1000 /code +RUN ./manage.py compress + USER 1000 WORKDIR /code diff --git a/chart/values.yaml b/chart/values.yaml index 56c87ba6..b32e8e6a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -24,7 +24,7 @@ initCommands: zipfile.ZipFile('/code/data/nuremberg_prod_dump_latest.sqlite3.zip').extractall(path='/tmp') EOF - name: collectstatic - command: './manage.py collectstatic --noinput && ./manage.py compress --force' + command: './manage.py collectstatic --noinput' podSecurityContext: fsGroup: 1000 diff --git a/web/nuremberg/settings.py b/web/nuremberg/settings.py index 3ebbe5e5..e4ad23f7 100644 --- a/web/nuremberg/settings.py +++ b/web/nuremberg/settings.py @@ -148,6 +148,7 @@ COMPRESS_STORAGE = 'compressor.storage.OfflineManifestFileStorage' COMPRESS_OFFLINE = True COMPRESS_OFFLINE_MANIFEST = 'compress-manifest.json' +COMPRESS_OUTPUT_DIR = os.path.join(BASE_DIR, 'core/static/') # whitenoise settings # https://warehouse.python.org/project/whitenoise/