Django Compressor - CloudFront and manifest.json

I am having problems working with the django compressor to work with CloudFront. I run a stand-alone compression command to create the compressed files and manifest.json file. After that, I run the collector to load the compressed files into my S3 bucket.

These static files are then sent 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 that CloudFront is serving an older version of manifest.json, which means the compressor throws a stand-alone GenerationError.

Even using in-place caching, I fear that my manifest file will be incorrect if the cache server is disconnected or differently for some reason.

Am I missing something here to make sure that I am not starting offline GenerationError?

+5
1

, Amazon CloudFront , , "" , . .

manifest.json AWS Console . CloudFront .

: http://aws.amazon.com/en/cloudfront/ ( )

0

All Articles