I'm having some trouble getting django compressor to work with CloudFront. I'm running the offline compress command to generate my compressed files and the manifest.json file. After this, I am then running collectstatic to upload the compressed files to my S3 bucket.
These static files are then served from CloudFront, so my settings look something like this:
STATIC_ROOT = ''
STATIC_URL = 'http://<my-cloudfront-domain>/somebucket/'
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
COMPRESS_OFFLINE = True
The problem is, CloudFront is serving an older version of manifest.json, meaning compressor is throwing an OfflineGenerationError.
Even with a cache backend in place, I'm worried that my manifest file will be incorrect if the cache server is for offline / flushed for whatever reason.
Am I missing something here to ensure I don't run into the OfflineGenerationError?
manifest.jsonvia the static URL instead of using the default file storage; if it did the latter, S3 would be accessed directly and there'd be no caching issue... assuming manifest.json is not used by the client. I haven't seen my client try to access it yet. - Bryan