Skip to content

Commit

Permalink
refactor: weaverse/settings.py 수정
Browse files Browse the repository at this point in the history
- AWS S3 스토리지 설정 추가
  • Loading branch information
devnproyj22 committed Oct 7, 2024
1 parent 39d1a52 commit 9ea107c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions weaverse/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,15 @@
"SERVE_URLCONF": "weaverse.urls",
"EXTERNAL_DOCS": {"description": "Weaverse GitHub", "url": ""},
}

# S3 설정
AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")
AWS_S3_REGION_NAME = os.getenv("AWS_S3_REGION_NAME")
AWS_S3_CUSTOM_DOMAIN = f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com"
AWS_S3_OBJECT_PARAMETERS = {
"CacheControl": "max-age=86400",
}

DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"

0 comments on commit 9ea107c

Please sign in to comment.