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 authored and Faraz32123 committed Apr 25, 2024
1 parent 4b1ccd4 commit ecff88e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/20240412_140658_andres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [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 ecff88e

Please sign in to comment.