2019-06-05 13:43:51 +00:00
|
|
|
AWS_S3_HOST = "{{ MINIO_HOST }}"
|
|
|
|
AWS_S3_USE_SSL = {{ "True" if ACTIVATE_HTTPS else "False" }}
|
|
|
|
AWS_S3_SECURE_URLS = {{ "True" if ACTIVATE_HTTPS else "False" }}
|
|
|
|
AWS_S3_CALLING_FORMAT = "boto.s3.connection.OrdinaryCallingFormat"
|
2019-06-05 18:07:41 +00:00
|
|
|
AWS_AUTO_CREATE_BUCKET = False # explicit is better than implicit
|
2019-06-05 13:43:51 +00:00
|
|
|
|
|
|
|
# Configuring boto is required for ora2 because ora2 does not read
|
|
|
|
# host/port/ssl settings from django. Hence this hack.
|
|
|
|
# http://docs.pythonboto.org/en/latest/boto_config_tut.html
|
|
|
|
import os
|
|
|
|
os.environ["AWS_CREDENTIAL_FILE"] = "/tmp/boto.cfg"
|
|
|
|
with open("/tmp/boto.cfg", "w") as f:
|
|
|
|
f.write("""[Boto]
|
|
|
|
is_secure = {{ "True" if ACTIVATE_HTTPS else "False" }}
|
|
|
|
[s3]
|
|
|
|
host = {{ MINIO_HOST }}
|
|
|
|
calling_format = boto.s3.connection.OrdinaryCallingFormat""")
|