From fbafd1c30112a94b73ac2d89880d57fc0659647c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Fri, 22 Nov 2019 09:25:29 +0100 Subject: [PATCH] Fix incorrect django settings during CMS init --- tutor/templates/hooks/cms/init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tutor/templates/hooks/cms/init b/tutor/templates/hooks/cms/init index d21c0a4..89b4c9e 100644 --- a/tutor/templates/hooks/cms/init +++ b/tutor/templates/hooks/cms/init @@ -1,4 +1,9 @@ -dockerize -wait tcp://{{ MYSQL_HOST }}:{{ MYSQL_PORT }} -timeout 20s && ./manage.py cms migrate +dockerize -wait tcp://{{ MYSQL_HOST }}:{{ MYSQL_PORT }} -timeout 20s + +export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS +echo "Loading settings $DJANGO_SETTINGS_MODULE" + +./manage.py cms migrate # Fix incorrect uploaded file path if [ -d /openedx/data/uploads/ ]; then