Improve S3 config

pull/399/head
Jake Howard 2023-02-03 10:22:00 +00:00 zatwierdzone przez Matt Westcott
rodzic db5263696b
commit 4235db5273
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -150,12 +150,11 @@ STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
if "AWS_STORAGE_BUCKET_NAME" in os.environ: if "AWS_STORAGE_BUCKET_NAME" in os.environ:
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME") AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")
AWS_S3_CUSTOM_DOMAIN = "%s.s3.amazonaws.com" % AWS_STORAGE_BUCKET_NAME AWS_QUERYSTRING_AUTH = False
AWS_AUTO_CREATE_BUCKET = True
INSTALLED_APPS.append("storages") INSTALLED_APPS.append("storages")
MEDIA_URL = "https://%s/" % AWS_S3_CUSTOM_DOMAIN
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
AWS_S3_FILE_OVERWRITE = False
AWS_DEFAULT_ACL = "private"
if "GS_BUCKET_NAME" in os.environ: if "GS_BUCKET_NAME" in os.environ:
GS_BUCKET_NAME = os.getenv("GS_BUCKET_NAME") GS_BUCKET_NAME = os.getenv("GS_BUCKET_NAME")