Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create volume for private LMS/CMS media assets #1124

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/20240926_151223_dave_private_media.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Feature] Create a new /data/openedx-media-private volume to store media files that are not publicly accessible via the browser, and create configuration that Learning Core (openedx-learning) will use to access this storage space. Learning Core will use a sub-directory of /data/openedx-media-private to store Content Library file uploads, but other apps can create their own sub-directories for their own use. (by @ormsbee)
kdmccormick marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions tutor/templates/apps/openedx/settings/partials/common_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,14 @@
"user": None,
}

OPENEDX_LEARNING = {
'MEDIA': {
"BACKEND": "django.core.files.storage.FileSystemStorage",
"OPTIONS": {
"location": "/openedx/media-private/openedx-learning",
}
}
}

{{ patch("openedx-common-settings") }}
######## End of settings common to LMS and CMS
5 changes: 5 additions & 0 deletions tutor/templates/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
- ../../data/lms:/mounts/lms
- ../../data/cms:/mounts/cms
- ../../data/openedx-media:/mounts/openedx
- ../../data/openedx-media-private:/mounts/openedx-private
{% if RUN_MONGODB %}- ../../data/mongodb:/mounts/mongodb{% endif %}
{% if RUN_MYSQL %}- ../../data/mysql:/mounts/mysql{% endif %}
{% if RUN_ELASTICSEARCH %}- ../../data/elasticsearch:/mounts/elasticsearch{% endif %}
Expand Down Expand Up @@ -112,6 +113,7 @@ services:
- ../apps/openedx/uwsgi.ini:/openedx/uwsgi.ini:ro
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
- ../../data/openedx-media-private:/openedx/media-private
{%- for mount in iter_mounts(MOUNTS, "openedx", "lms") %}
- {{ mount }}
{%- endfor %}
Expand All @@ -138,6 +140,7 @@ services:
- ../apps/openedx/uwsgi.ini:/openedx/uwsgi.ini:ro
- ../../data/cms:/openedx/data
- ../../data/openedx-media:/openedx/media
- ../../data/openedx-media-private:/openedx/media-private
{%- for mount in iter_mounts(MOUNTS, "openedx", "cms") %}
- {{ mount }}
{%- endfor %}
Expand Down Expand Up @@ -166,6 +169,7 @@ services:
- ../apps/openedx/config:/openedx/config:ro
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
- ../../data/openedx-media-private:/openedx/media-private
{%- for mount in iter_mounts(MOUNTS, "openedx", "lms-worker") %}
- {{ mount }}
{%- endfor %}
Expand All @@ -185,6 +189,7 @@ services:
- ../apps/openedx/config:/openedx/config:ro
- ../../data/cms:/openedx/data
- ../../data/openedx-media:/openedx/media
- ../../data/openedx-media-private:/openedx/media-private
{%- for mount in iter_mounts(MOUNTS, "openedx", "cms-worker") %}
- {{ mount }}
{%- endfor %}
Expand Down
Loading