From 163f955e9b5d4c449da5085d686af9b88cef99c5 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Thu, 31 Oct 2024 18:46:01 +0500 Subject: [PATCH] fix: add PROFILE_IMAGE_BACKEND settings for k8s - Add PROFILE_IMAGE_BACKEND settings in tutor-minio using patch named `openedx-lms-production-settings` so that profile images persist in k8s deployment of openedx and profile images can work now for both local(will use minio storage if minio plugin is enabled) and dev environment. - In case of dev environment, backend expects the valid S3 `base_url` key in the PROFILE_IMAGE_BACKEND settings. It will be using openedx `DEFAULT_FILE_STORAGE`. --- changelog.d/20241010_170607_faraz.maqsood.md | 1 + tutorminio/patches/openedx-lms-production-settings | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 changelog.d/20241010_170607_faraz.maqsood.md create mode 100644 tutorminio/patches/openedx-lms-production-settings diff --git a/changelog.d/20241010_170607_faraz.maqsood.md b/changelog.d/20241010_170607_faraz.maqsood.md new file mode 100644 index 0000000..8ebdb22 --- /dev/null +++ b/changelog.d/20241010_170607_faraz.maqsood.md @@ -0,0 +1 @@ +- [BugFix] Add PROFILE_IMAGE_BACKEND settings in minio using patch named `openedx-lms-production-settings` so that profile images persist in k8s deployment of openedx and profile images can work for both local and dev environment. (by @Faraz32123) diff --git a/tutorminio/patches/openedx-lms-production-settings b/tutorminio/patches/openedx-lms-production-settings new file mode 100644 index 0000000..3ec80f6 --- /dev/null +++ b/tutorminio/patches/openedx-lms-production-settings @@ -0,0 +1,8 @@ +PROFILE_IMAGE_BACKEND = { + "class": DEFAULT_FILE_STORAGE, + "options": { + "bucket_name": "{{ MINIO_BUCKET_NAME }}", + "querystring_auth": False, + "location": PROFILE_IMAGE_BACKEND["options"]["location"].lstrip("/"), + }, +}