Run django-compress in offline mode

Required to use both whitenoise and compress with precompile steps
This commit is contained in:
audax 2019-09-12 21:33:13 +02:00
parent fefb6cc64b
commit 6108c6f076
3 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
# django-compressor
# ------------------------------------------------------------------------------
COMPRESS_ENABLED=
COMPRESS_ENABLED=True
# Gunicorn
# ------------------------------------------------------------------------------

View File

@ -5,5 +5,6 @@ set -o pipefail
set -o nounset
python /app/manage.py compress
python /app/manage.py collectstatic --noinput
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app

View File

@ -108,6 +108,7 @@ COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True)
# COMPRESS_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_URL
COMPRESS_URL = STATIC_URL # noqa F405
COMPRESS_OFFLINE = True
# Collectfast
# ------------------------------------------------------------------------------
# https://github.com/antonagestam/collectfast#installation