Skip to content

Commit

Permalink
Update AWS conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Nov 16, 2023
1 parent 22e10e9 commit dd2a22f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@
if os.getenv("S3_HOST"):
AWS_S3_ACCESS_KEY_ID = os.getenv("S3_KEY_ID", "123")
AWS_S3_SECRET_ACCESS_KEY = os.getenv("S3_KEY_SECRET", "secret")
AWS_S3_ENDPOINT_URL = os.getenv("S3_HOST")
AWS_S3_ENDPOINT_URL = f"{os.getenv('S3_PROTOCOL', 'https')}://{os.getenv('S3_HOST')}"
AWS_STORAGE_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "set-bucket-name")
AWS_S3_STORAGE_BUCKET_REGION = os.getenv("S3_BUCKET_REGION", "fr")
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
MEDIA_URL = os.getenv("S3_HOST", "set-var-env.com/")
MEDIA_URL = f"{AWS_S3_ENDPOINT_URL}/"
else:
DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage"
MEDIA_URL = "medias/"
Expand Down

0 comments on commit dd2a22f

Please sign in to comment.