-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #617 from Yelinz/add-object-storage
feat: add django storages and settings for s3 storage
- Loading branch information
Showing
4 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,28 @@ If either `EMAIL_HOST_USER` or `EMAIL_HOST_PASSWORD` is empty, Django won't atte | |
* `ADMINS`: list of people who will get code error notifications. Items in the list should follow this example: `Test Example <[email protected]>,Test2 <[email protected]>` | ||
|
||
## Sentry | ||
* `SENTRY_DSN`: identifier (data source name) for where to send events to. If no value is provided, sentry won't be activated (default: ") | ||
* `SENTRY_DSN`: identifier (data source name) for where to send events to. If no value is provided, sentry won't be activated (default: "") | ||
* `SENTRY_ENVIRONMENT`: which app environment sent an event to sentry (default: `development`) | ||
* `SENTRY_TRACES_SAMPLE_RATE`: percentage chance a given transaction will be sent to Sentry (default: `1.0`) | ||
* `SENTRY_SEND_DEFAULT_PII`: enable send PII data that associates users to errors (default: `True`) | ||
|
||
## Template storage | ||
* `FILE_STORAGE`: Django file storage backend (default: `django.core.files.storage.FileSystemStorage`) | ||
* `MEDIA_ROOT`: Absolute filesystem path to the directory that will hold user-uploaded files. (default: "") | ||
* `MEDIA_URL`: URL that handles the media served from MEDIA_ROOT, used for managing stored files. When using buckets this needs to be changed. (default: `api/v1/template/`) | ||
|
||
|
||
### [django-storages](https://django-storages.readthedocs.io/en/1.13.2/backends/amazon-S3.html) S3 settings | ||
Refer to for example [Digital Ocean](https://django-storages.readthedocs.io/en/1.13.2/backends/digital-ocean-spaces.html) configuration if using a S3 compatible storage which isn't AWS. | ||
|
||
Required to use S3 storage: | ||
* `AWS_ACCESS_KEY_ID`: AWS access key id | ||
* `AWS_S3_SECRET_ACCESS_KEY`: AWS secret access key | ||
* `AWS_STORAGE_BUCKET_NAME`: Storage bucket name | ||
|
||
Optional: | ||
* `AWS_S3_ENDPOINT_URL`: Custom S3 URL to use when connecting to S3, including scheme. (default: "") | ||
* `AWS_S3_REGION_NAME`: Region of the storage (default: "") | ||
* `AWS_LOCATION`: A path prefix that will be prepended to all uploads (default: "") | ||
* `AWS_S3_FILE_OVERWRITE`: If `True` Files with the same name will overwrite each other. Otherwise extra characters are appended. (default: `False`) | ||
* `AWS_S3_SIGNATURE_VERSION`: S3 signature version to use (default: `s2`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters