From 63a2ee0edad92bb9e1082f92688a7c360bb3173d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 8 Jan 2020 22:28:12 +0100 Subject: [PATCH] Make discovery more debuggable --- README.rst | 4 +++- tutordiscovery/patches/local-docker-compose-dev-services | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5445e22..195e741 100644 --- a/README.rst +++ b/README.rst @@ -70,7 +70,9 @@ Debugging To debug the course discovery service, you are encouraged to mount the course-discovery repo from the host in the development container: - tutor dev run -v ~/projets/openedx/repos/course-discovery/:/openedx/discovery -p 8000:8000 discovery + tutor dev runserver -v ~/projets/openedx/repos/course-discovery/:/openedx/discovery discovery + +You can then access the development server at http://localhost:8381. Feel free to add breakpoints (``import pdb; pdb.set_trace()``) anywhere in your source code to debug your application. License ------- diff --git a/tutordiscovery/patches/local-docker-compose-dev-services b/tutordiscovery/patches/local-docker-compose-dev-services index 503c095..4e39f1a 100644 --- a/tutordiscovery/patches/local-docker-compose-dev-services +++ b/tutordiscovery/patches/local-docker-compose-dev-services @@ -1,4 +1,6 @@ discovery: environment: DJANGO_SETTINGS_MODULE: course_discovery.settings.tutor.development - command: ./manage.py runserver 0.0.0.0:8000 \ No newline at end of file + command: ./manage.py runserver 0.0.0.0:8000 + ports: + - "8381:8000" \ No newline at end of file