Skip to content

Commit

Permalink
try to add config for s3
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Jul 25, 2024
1 parent a55947a commit 3083259
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion config/settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@
env = environ.Env()


STORAGES = {
"default": {
"BACKEND": "lemarche.utils.s3boto.S3BotoStorage",
"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", ""),
},
}
}


ALLOWED_HOSTS = [
"127.0.0.1",
"staging.inclusion.beta.gouv.fr",
Expand All @@ -24,7 +40,7 @@
SECURE_SSL_REDIRECT = env.bool("SECURE_SSL_REDIRECT", True)

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


# Sentry
Expand Down

0 comments on commit 3083259

Please sign in to comment.