Skip to content

Commit

Permalink
fix: Create media directory in Dockerfile.
Browse files Browse the repository at this point in the history
If the media directory does not exist at the time that
uwsgi is launched, the mapping to /media to serve
media files will not be created.
  • Loading branch information
angonz committed Apr 24, 2024
1 parent 1b1d902 commit 5fa8b76
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions changelog.d/20240412_140658_andres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

<!--
Create a changelog entry for every new user-facing change. Please respect the following instructions:
- Indicate breaking changes by prepending an explosion 💥 character.
- Prefix your changes with either [Bugfix], [Improvement], [Feature], [Security], [Deprecation].
- You may optionally append "(by @<author>)" at the end of the line, where "<author>" is either one (just one)
of your GitHub username, real name or affiliated organization. These affiliations will be displayed in
the release notes for every release.
-->

<!-- - 💥[Feature] Foobarize the blorginator. This breaks plugins by renaming the `FOO_DO` filter to `BAR_DO`. (by @regisb) -->
<!-- - [Improvement] This is a non-breaking change. Life is good. (by @billgates) -->

- [Bugfix] Fix the docker image to allow media files to be served by uwsgi. (by @angonz)
3 changes: 3 additions & 0 deletions tutordiscovery/templates/discovery/build/discovery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ RUN python manage.py compilemessages
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
RUN mkdir course_discovery/media

# Run production server
ENV DJANGO_SETTINGS_MODULE course_discovery.settings.tutor.production
EXPOSE 8000
Expand Down

0 comments on commit 5fa8b76

Please sign in to comment.