mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 06:37:46 +00:00
Get rid of ugly "notes.openedx" network alias
We achieve this thanks to a patch to edx-oauth2-provider: https://github.com/edx/edx-oauth2-provider/pull/59 The network alias was required to circumvent url validation by the oauth2 client creation tool. But the network alias was not compatible with k8s deployment.
This commit is contained in:
parent
53294ffc37
commit
afc4b15253
@ -1,2 +1,2 @@
|
||||
"EDXNOTES_PUBLIC_API": "{{ "https" if ACTIVATE_HTTPS else "http" }}://{{ NOTES_HOST }}/api/v1",
|
||||
"EDXNOTES_INTERNAL_API": "http://notes.openedx:8000/api/v1"
|
||||
"EDXNOTES_INTERNAL_API": "http://notes:8000/api/v1"
|
@ -1,10 +1,6 @@
|
||||
############# Notes: backend store for edX Student Notes
|
||||
notes:
|
||||
image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- notes.openedx
|
||||
environment:
|
||||
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
||||
volumes:
|
||||
|
@ -4,7 +4,6 @@ SECRET_KEY = "{{ NOTES_SECRET_KEY }}"
|
||||
ALLOWED_HOSTS = [
|
||||
"localhost",
|
||||
"notes",
|
||||
"notes.openedx",
|
||||
"notes.localhost",
|
||||
"{{ NOTES_HOST }}",
|
||||
]
|
||||
|
@ -1,5 +1,18 @@
|
||||
./manage.py lms --settings=tutor.production manage_user notes notes@{{ LMS_HOST }} --staff --superuser
|
||||
./manage.py lms --settings=tutor.production create_oauth2_client \
|
||||
"http://notes.openedx:8000" "http://notes.openedx:8000/complete/edx-oidc/" confidential \
|
||||
--client_name edx-notes --client_id notes --client_secret {{ NOTES_OAUTH2_SECRET }} \
|
||||
--trusted --logout_uri "http://notes.openedx:8000/logout/" --username notes
|
||||
export DJANGO_SETTINGS_MODULE=lms.envs.tutor.production
|
||||
|
||||
# Modify users created an incorrect email and that might clash with the newly created users
|
||||
./manage.py lms shell -c \
|
||||
"from django.contrib.auth import get_user_model;\
|
||||
get_user_model().objects.filter(username='notes').exclude(email='notes@openedx').update(email='notes@openedx')"
|
||||
|
||||
./manage.py lms manage_user notes notes@openedx --staff --superuser
|
||||
./manage.py lms create_oauth2_client \
|
||||
"http://notes:8000" \
|
||||
"http://notes:8000/complete/edx-oidc/" \
|
||||
confidential \
|
||||
--client_name notes \
|
||||
--client_id notes \
|
||||
--client_secret {{ NOTES_OAUTH2_SECRET }} \
|
||||
--trusted \
|
||||
--logout_uri "http://notes:8000/logout/" \
|
||||
--username notes
|
@ -49,6 +49,9 @@ RUN pip install -r requirements/edx/development.txt
|
||||
RUN pip uninstall -y ora2 && \
|
||||
pip install git+https://github.com/overhangio/edx-ora2.git@2.2.0-patched#egg=ora2==2.2.0
|
||||
|
||||
# Install patched version of edx-oauth2-provider
|
||||
RUN pip install git+https://github.com/overhangio/edx-oauth2-provider.git@1.2.3#egg=edx-oauth2-provider==1.2.3
|
||||
|
||||
# Install a recent version of nodejs
|
||||
RUN nodeenv /openedx/nodeenv --node=8.9.3 --prebuilt
|
||||
ENV PATH /openedx/nodeenv/bin:${PATH}
|
||||
|
Loading…
Reference in New Issue
Block a user