From 4235db5273f2bdc08fca6d0cdba8019fba01285f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 3 Feb 2023 10:22:00 +0000 Subject: [PATCH] Improve S3 config --- bakerydemo/settings/production.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bakerydemo/settings/production.py b/bakerydemo/settings/production.py index 8a2e78b..8be3d4a 100644 --- a/bakerydemo/settings/production.py +++ b/bakerydemo/settings/production.py @@ -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")