kopia lustrzana https://github.com/wagtail/bakerydemo
Improve S3 config
rodzic
db5263696b
commit
4235db5273
|
@ -150,12 +150,11 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
|||
|
||||
if "AWS_STORAGE_BUCKET_NAME" in os.environ:
|
||||
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")
|
||||
AWS_S3_CUSTOM_DOMAIN = "%s.s3.amazonaws.com" % AWS_STORAGE_BUCKET_NAME
|
||||
AWS_AUTO_CREATE_BUCKET = True
|
||||
|
||||
AWS_QUERYSTRING_AUTH = False
|
||||
INSTALLED_APPS.append("storages")
|
||||
MEDIA_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
|
||||
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
||||
AWS_S3_FILE_OVERWRITE = False
|
||||
AWS_DEFAULT_ACL = "private"
|
||||
|
||||
if "GS_BUCKET_NAME" in os.environ:
|
||||
GS_BUCKET_NAME = os.getenv("GS_BUCKET_NAME")
|
||||
|
|
Ładowanie…
Reference in New Issue