6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 14:17:46 +00:00

Fix SMTP which should be enabled only when required

This commit is contained in:
Régis Behmo 2019-03-22 17:58:41 +01:00
parent 78a81ab509
commit 65433e1e1f
2 changed files with 7 additions and 4 deletions

View File

@ -113,8 +113,10 @@ def load_user(config, root):
loaded = yaml.load(fi.read())
for key, value in loaded.items():
config[key] = value
upgrade_obsolete(config)
# Here, we migrate obsolete configuration parameters
def upgrade_obsolete(config):
# Openedx-specific mysql passwords
if "MYSQL_PASSWORD" in config:
config["MYSQL_ROOT_PASSWORD"] = config["MYSQL_PASSWORD"]
config["OPENEDX_MYSQL_PASSWORD"] = config["MYSQL_PASSWORD"]

View File

@ -76,10 +76,11 @@ services:
restart: unless-stopped
{% endif %}
# Simple SMTP server
{% if ACTIVATE_SMTP %}
smtp:
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_SMTP }}
restart: unless-stopped
{% endif %}
############# Forum
@ -113,7 +114,7 @@ services:
{% if ACTIVATE_MONGODB %}- mongodb{% endif %}
{% if ACTIVATE_MYSQL %}- mysql{% endif %}
{% if ACTIVATE_RABBITMQ %}- rabbitmq{% endif %}
- smtp
{% if ACTIVATE_SMTP %}- smtp{% endif %}
cms:
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_OPENEDX }}
@ -132,7 +133,7 @@ services:
{% if ACTIVATE_MONGODB %}- mongodb{% endif %}
{% if ACTIVATE_MYSQL %}- mysql{% endif %}
{% if ACTIVATE_RABBITMQ %}- rabbitmq{% endif %}
- smtp
{% if ACTIVATE_SMTP %}- smtp{% endif %}
############# LMS and CMS workers