Commit ce2e5138 by Piotr Mitros

AWS settings for XBlocks to have filesystem-like storage

parent c7d41833
...@@ -88,6 +88,12 @@ CELERY_QUEUES = { ...@@ -88,6 +88,12 @@ CELERY_QUEUES = {
with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file:
ENV_TOKENS = json.load(env_file) ENV_TOKENS = json.load(env_file)
DJFS = {
'type' : 's3fs',
'bucket' : ENV_TOKENS.get('xblock-fs-storage-bucket', None),
'prefix' : ENV_TOKENS.get('xblock-fs-storage-prefix', '')
}
# STATIC_URL_BASE specifies the base url to use for static files # STATIC_URL_BASE specifies the base url to use for static files
STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None) STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None)
if STATIC_URL_BASE: if STATIC_URL_BASE:
......
...@@ -111,6 +111,12 @@ if os.environ.get('QUEUE') == 'high_mem': ...@@ -111,6 +111,12 @@ if os.environ.get('QUEUE') == 'high_mem':
with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file:
ENV_TOKENS = json.load(env_file) ENV_TOKENS = json.load(env_file)
DJFS = {
'type' : 's3fs',
'bucket' : ENV_TOKENS.get('xblock-fs-storage-bucket', None),
'prefix' : ENV_TOKENS.get('xblock-fs-storage-prefix', '')
}
# STATIC_ROOT specifies the directory where static files are # STATIC_ROOT specifies the directory where static files are
# collected # collected
STATIC_ROOT_BASE = ENV_TOKENS.get('STATIC_ROOT_BASE', None) STATIC_ROOT_BASE = ENV_TOKENS.get('STATIC_ROOT_BASE', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment