Skip to content

Commit

Permalink
Merge pull request #8 from edly-io/fix/remove-dev-partner
Browse files Browse the repository at this point in the history
Add optional dev site creation
  • Loading branch information
hinakhadim authored Nov 15, 2023
2 parents 2e32480 + 0f5e142 commit 062b794
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions tutordiscovery/templates/discovery/tasks/discovery/init
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
make migrate

{% if CREATE_DEV_SITES %}
# Development partners
./manage.py create_or_update_partner \
--site-id 1 \
Expand All @@ -13,6 +14,7 @@ make migrate
--lms-coursemode-api-url "http://{{ LMS_HOST }}:8000/api/course_modes/v1/" \
--marketing-site-api-url "http://{{ WORDPRESS_HOST }}:8000/wp-json/" \
--marketing-site-url-root "http://{{ WORDPRESS_HOST }}:8000"
{% endif %}

# Production partner
./manage.py create_or_update_partner \
Expand Down
9 changes: 4 additions & 5 deletions tutordiscovery/templates/discovery/tasks/lms/init
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Development client
./manage.py lms create_dot_application \
--grant-type client-credentials \
--redirect-uris "http://{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/" \
--redirect-uris "http://{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/ {% for multisite_host in MULTISITE_HOSTS %}http://{{ multisite_host }}-{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/ {% endfor %}" \
--client-id {{ DISCOVERY_OAUTH2_KEY_DEV }} \
--client-secret {{ DISCOVERY_OAUTH2_SECRET }} \
--scopes user_id \
Expand All @@ -22,7 +22,7 @@
discovery
./manage.py lms create_dot_application \
--grant-type authorization-code \
--redirect-uris "http://{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/" \
--redirect-uris "http://{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/ {% for multisite_host in MULTISITE_HOSTS %}http://{{ multisite_host }}-{{ DISCOVERY_HOST }}:8381/complete/edx-oauth2/ {% endfor %}" \
--client-id {{ DISCOVERY_OAUTH2_KEY_SSO_DEV }} \
--client-secret {{ DISCOVERY_OAUTH2_SECRET_SSO }} \
--scopes user_id \
Expand All @@ -34,7 +34,7 @@
# Production client
./manage.py lms create_dot_application \
--grant-type client-credentials \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/complete/edx-oauth2/" \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/complete/edx-oauth2/ {% for multisite_host in MULTISITE_HOSTS %}{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ multisite_host }}-{{ DISCOVERY_HOST }}/complete/edx-oauth2/ {% endfor %}" \
--client-id {{ DISCOVERY_OAUTH2_KEY }} \
--client-secret {{ DISCOVERY_OAUTH2_SECRET }} \
--scopes user_id \
Expand All @@ -44,7 +44,7 @@
discovery
./manage.py lms create_dot_application \
--grant-type authorization-code \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/complete/edx-oauth2/" \
--redirect-uris "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/complete/edx-oauth2/ {% for multisite_host in MULTISITE_HOSTS %}{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ multisite_host }}-{{ DISCOVERY_HOST }}/complete/edx-oauth2/ {% endfor %}" \
--client-id {{ DISCOVERY_OAUTH2_KEY_SSO }} \
--client-secret {{ DISCOVERY_OAUTH2_SECRET_SSO }} \
--scopes user_id \
Expand All @@ -58,4 +58,3 @@
# sites. This is important because the programs and courses returned for each
# site will differ.
site-configuration set -d {{ LMS_HOST }} COURSE_CATALOG_API_URL {% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1
site-configuration set -d {{ LMS_HOST }}:8000 COURSE_CATALOG_API_URL http://{{ DISCOVERY_HOST }}:8381/api/v1

0 comments on commit 062b794

Please sign in to comment.