Skip to content

Commit

Permalink
change for staticfiles to be saved special
Browse files Browse the repository at this point in the history
  • Loading branch information
dakopen committed Jul 20, 2024
1 parent f2fdb12 commit 7247f42
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions aussprachetrainer/aussprachetrainer/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,23 @@ def before_send(event, hint):

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
if USE_AWS:
AWS_ACCESS_KEY_ID = "AKIA47CRUZ355PV5KPF2"
AWS_SECRET_ACCESS_KEY = get_secret('AWS-Lightsail-AusspracheTrainer-org-Storage')
AWS_STORAGE_BUCKET_NAME = 'aussprachetrainer-org-website'
AWS_S3_ENDPOINT_URL = 'https://s3.eu-central-1.amazonaws.com'
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400',
}

AWS_ACCESS_KEY_ID = get_secret('AWS-access-key-ID')
AWS_SECRET_ACCESS_KEY = get_secret('AWS-secret-access-key')
AWS_STORAGE_BUCKET_NAME = 'aussprachetrainer'
AWS_S3_ENDPOINT_URL = 'https://fra1.digitaloceanspaces.com'
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400',
}
else:
AWS_ACCESS_KEY_ID = get_secret('AWS-access-key-ID')
AWS_SECRET_ACCESS_KEY = get_secret('AWS-secret-access-key')
AWS_STORAGE_BUCKET_NAME = 'aussprachetrainer'
AWS_S3_ENDPOINT_URL = 'https://fra1.digitaloceanspaces.com'
AWS_S3_OBJECT_PARAMETERS = {
'CacheControl': 'max-age=86400',
}

AWS_LOCATION = 'staticfiles' # Optional: Use if you want to store files in a specific folder within your Space

Expand Down

0 comments on commit 7247f42

Please sign in to comment.