diff --git a/CHANGELOG.md b/CHANGELOG.md index 5caa709..d35dcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Every user-facing change should have an entry in this changelog. Please respect - [Feature] Add default PYTHONBREAKPOINT to openedx/Dockerfile (by @Carlos-Muniz) - [Bugfix] Fix smtp server port in `cms.yml` which was causing email sending failures in the Studio. (by @regisb) +- [Bugfix] Skip waiting for MongoDB if it is served using SRV records. (by @gabor-boros) - [Improvement] Use `git am` instead of `cherry-pick` to simplify patching process. - [Improvement] Tutor is now compatible with Docker Compose subcommand. diff --git a/tutor/templates/hooks/lms/init b/tutor/templates/hooks/lms/init index 0276cd8..348b493 100644 --- a/tutor/templates/hooks/lms/init +++ b/tutor/templates/hooks/lms/init @@ -1,5 +1,10 @@ dockerize -wait tcp://{{ MYSQL_HOST }}:{{ MYSQL_PORT }} -timeout 20s + +{%- if MONGODB_HOST.startswith("mongodb+srv://") %} +echo "MongoDB is using SRV records, so we cannot wait for it to be ready" +{%- else %} dockerize -wait tcp://{{ MONGODB_HOST }}:{{ MONGODB_PORT }} -timeout 20s +{%- endif %} echo "Loading settings $DJANGO_SETTINGS_MODULE" @@ -38,3 +43,4 @@ fi # Create waffle switches to enable some features, if they have not been explicitly defined before # Completion tracking: add green ticks to every completed unit (./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on +