More Minio things

This commit is contained in:
Kumi 2020-04-08 13:15:22 +02:00
parent 21d8ec880d
commit f91647ba50
3 changed files with 26 additions and 2 deletions

View file

@ -18,6 +18,8 @@ DB_NAME = "expephalon"
AWS_ACCESS_KEY_ID = None AWS_ACCESS_KEY_ID = None
AWS_SECRET_ACCESS_KEY = None AWS_SECRET_ACCESS_KEY = None
AWS_STORAGE_BUCKET_NAME = None
AWS_S3_ENDPOINT_URL = None
# Whether debug messages should be output - set to False in production (exposes sensitive data) # Whether debug messages should be output - set to False in production (exposes sensitive data)

View file

@ -117,7 +117,7 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"), os.path.join(BASE_DIR, "static"),
] ]
#STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
# Password hasher # Password hasher
# https://docs.djangoproject.com/en/3.0/topics/auth/passwords/#how-django-stores-passwords # https://docs.djangoproject.com/en/3.0/topics/auth/passwords/#how-django-stores-passwords
@ -131,4 +131,5 @@ PASSWORD_HASHERS = [
# Media # Media
#DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
AWS_DEFAULT_ACL = None

21
iam.json Normal file
View file

@ -0,0 +1,21 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObjectAcl",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::example-bucket-name/*",
"arn:aws:s3:::example-bucket-name"
]
}
]
}