Skip to content

Commit

Permalink
Fix: s3 settings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyyhh0208 committed Oct 15, 2024
1 parent c62c7c2 commit 35a048e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/worklog/worklog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")
AWS_REGION_NAME = os.getenv("AWS_REGION_NAME")

# 테스트 환경에서는 로컬 스토리지를 사용
if 'test' in sys.argv:
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

# s3 설정
AWS_S3_CUSTOM_DOMAIN = f"{AWS_STORAGE_BUCKET_NAME}.s3.{AWS_REGION_NAME}.amazonaws.com"

Expand Down

0 comments on commit 35a048e

Please sign in to comment.