7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-05-31 13:20:48 +00:00
tutor/plugins/minio/tutorminio/patches/openedx-common-settings
2019-06-07 22:49:45 +02:00

18 lines
744 B
Plaintext

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"
AWS_AUTO_CREATE_BUCKET = False # explicit is better than implicit
# 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""")