From a40d767426918edbf41c11957475b838c4a40975 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Wed, 26 Jun 2024 13:59:02 +0500 Subject: [PATCH] refactor: address comments --- tutordiscovery/patches/local-docker-compose-dev-services | 2 +- tutordiscovery/patches/local-docker-compose-services | 2 +- tutordiscovery/templates/discovery/build/discovery/Dockerfile | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tutordiscovery/patches/local-docker-compose-dev-services b/tutordiscovery/patches/local-docker-compose-dev-services index ed1f6bf..95906db 100644 --- a/tutordiscovery/patches/local-docker-compose-dev-services +++ b/tutordiscovery/patches/local-docker-compose-dev-services @@ -5,7 +5,7 @@ discovery: stdin_open: true tty: true volumes: - - ../../data/discovery-media:/openedx/discovery/course_discovery/media + - ../../data/discovery/media:/openedx/discovery/course_discovery/media {%- for mount in iter_mounts(MOUNTS, "discovery") %} - {{ mount }} {%- endfor %} diff --git a/tutordiscovery/patches/local-docker-compose-services b/tutordiscovery/patches/local-docker-compose-services index c53a607..ddbf6ab 100644 --- a/tutordiscovery/patches/local-docker-compose-services +++ b/tutordiscovery/patches/local-docker-compose-services @@ -5,7 +5,7 @@ discovery: restart: unless-stopped volumes: - ../plugins/discovery/apps/settings/tutor:/openedx/discovery/course_discovery/settings/tutor:ro - - ../../data/discovery-media:/openedx/discovery/course_discovery/media + - ../../data/discovery/media:/openedx/discovery/course_discovery/media depends_on: - lms {% if RUN_MYSQL %}- mysql{% endif %} diff --git a/tutordiscovery/templates/discovery/build/discovery/Dockerfile b/tutordiscovery/templates/discovery/build/discovery/Dockerfile index 5f78c90..87894cd 100644 --- a/tutordiscovery/templates/discovery/build/discovery/Dockerfile +++ b/tutordiscovery/templates/discovery/build/discovery/Dockerfile @@ -86,10 +86,7 @@ COPY --chown=app:app assets.py ./course_discovery/settings/assets.py RUN DJANGO_SETTINGS_MODULE=course_discovery.settings.assets make static # Create media directory to serve media files -# have to change user at this step, as it gives permission error -User app RUN mkdir course_discovery/media -User root # Run production server ENV DJANGO_SETTINGS_MODULE=course_discovery.settings.tutor.production