Skip to content

Commit

Permalink
fix: s3 storage fix in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Sep 20, 2024
1 parent 05c2d85 commit 5a258a3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion config/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,24 @@
SECURE_SSL_REDIRECT = env.str("SECURE_SSL_REDIRECT", True)

MEDIA_URL = f"https://{S3_STORAGE_ENDPOINT_DOMAIN}/" # noqa
DEFAULT_FILE_STORAGE = "lemarche.utils.s3boto.S3BotoStorage"

STORAGES = {
"default": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": {
"bucket_name": S3_STORAGE_BUCKET_NAME, # noqa
"access_key": S3_STORAGE_ACCESS_KEY_ID, # noqa
"secret_key": S3_STORAGE_SECRET_ACCESS_KEY, # noqa
"endpoint_url": f"https://{S3_STORAGE_ENDPOINT_DOMAIN}", # noqa
"region_name": S3_STORAGE_BUCKET_REGION, # noqa
"file_overwrite": False,
"location": env.str("S3_LOCATION", ""),
},
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}


# Sentry
Expand Down

0 comments on commit 5a258a3

Please sign in to comment.