fix: Create media directory in Dockerfile.
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.
This commit is contained in:
parent
4b1ccd4ea5
commit
ecff88eb40
1
changelog.d/20240412_140658_andres.md
Normal file
1
changelog.d/20240412_140658_andres.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
- [Bugfix] Fix the docker image to allow media files to be served by uwsgi. (by @angonz)
|
||||||
@ -73,6 +73,9 @@ RUN python manage.py compilemessages
|
|||||||
COPY --chown=app:app assets.py ./course_discovery/settings/assets.py
|
COPY --chown=app:app assets.py ./course_discovery/settings/assets.py
|
||||||
RUN DJANGO_SETTINGS_MODULE=course_discovery.settings.assets make static
|
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
|
# Run production server
|
||||||
ENV DJANGO_SETTINGS_MODULE course_discovery.settings.tutor.production
|
ENV DJANGO_SETTINGS_MODULE course_discovery.settings.tutor.production
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user