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

fix: skip waiting for mongodb SRV records

Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
This commit is contained in:
Gabor Boros 2022-06-23 09:57:07 +02:00 committed by Régis Behmo
parent 4b8cf4ccc7
commit eadb04fee9
2 changed files with 7 additions and 0 deletions

View File

@ -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.

View File

@ -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