6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-10 09:02:14 +00:00
tutor/config/openedx/universal/cms/production.py
Régis Behmo 5cb51e0334 Allow direct access to gunicorn process in production
This is not a security issue because ports 8000-8001 are not open to the
world; it should also drastically simplify the life of many people. See
for instance issues #30 and #34.

Also, we allow access to nginx on hostnames "localhost" and
"studio.localhost" for lms and cms, respectively. Again, this will
remove much of the confusion for many users.
2018-06-08 17:32:22 -04:00

31 lines
1017 B
Python

import os
from ..aws import *
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
MEDIA_ROOT = "/openedx/data/uploads/"
# We need to activate dev_env for logging, otherwise rsyslog is required (but
# it is not available in docker).
LOGGING = get_logger_config(LOG_DIR,
logging_env=ENV_TOKENS['LOGGING_ENV'],
debug=False,
dev_env=True,
service_variant=SERVICE_VARIANT)
# Create folders if necessary
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
if not os.path.exists(folder):
os.makedirs(folder)
ALLOWED_HOSTS = [
ENV_TOKENS.get('CMS_BASE'),
'127.0.0.1', 'localhost', 'studio.localhost',
'127.0.0.1:8000', 'localhost:8000',
'127.0.0.1:8001', 'localhost:8001',
]
DEFAULT_FROM_EMAIL = 'registration@' + ENV_TOKENS['LMS_BASE']
DEFAULT_FEEDBACK_EMAIL = 'feedback@' + ENV_TOKENS['LMS_BASE']
SERVER_EMAIL = 'devops@' + ENV_TOKENS['LMS_BASE']