overhangio / tutor-discovery

Course Discovery plugin for Tutor
GNU Affero General Public License v3.0
11 stars 40 forks source link

use LMS_BASE_URL instead of LMS_HOST #32

Closed nimsacode closed 2 years ago

nimsacode commented 2 years ago

I recommend to use LMS_BASE_URL instead of LMS_HOST in this script and avoid hard coding the port number: ./tutordiscovery/templates/discovery/tasks/discovery/init

make migrate

# Development partners
./manage.py create_or_update_partner  \
  --site-id 1 \
  --site-domain {{ DISCOVERY_HOST }}:8381 \
  --code dev --name "Open edX - development" \
  --lms-url="http://lms:8000" \
  --studio-url="http://cms:8000" \
  --courses-api-url "http://{{ LMS_HOST }}:8000/api/courses/v1/" \
  --organizations-api-url "http://{{ LMS_HOST }}:8000/api/organizations/v1/"

# Production partner
./manage.py create_or_update_partner  \
  --site-id 2 \
  --site-domain {{ DISCOVERY_HOST }} \
  --code openedx --name "Open edX" \
  --lms-url="http://lms:8000" \
  --studio-url="http://cms:8000" \
  --courses-api-url "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/api/courses/v1/" \
  --organizations-api-url "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/api/organizations/v1/"

./manage.py refresh_course_metadata --partner_code=openedx
./manage.py update_index --disable-change-limit
regisb commented 2 years ago

Unfortunately LMS_BASE_URL is not part of the Tutor configuration. Let's close this for now, I don't want to have conversations within GitHub issues. I understand that #33 is an actual bug, but the solution that you recommend will not work out of the box.