Fix media folder permissions prod dockerfile (#5831)

This commit is contained in:
Dominique Plante 2025-05-12 01:17:13 -07:00 committed by GitHub
parent f7e1091764
commit 8a7b5473ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,6 +119,11 @@ COPY --from=client-builder --chown=django:django ${APP_HOME} ${APP_HOME}
COPY --chown=django:django . ${APP_HOME}
{%- endif %}
{%- if cookiecutter.cloud_provider == 'None' %}
# explicitly create the media folder before changing ownership below
RUN mkdir -p ${APP_HOME}/{{ cookiecutter.project_slug }}/media
{%- endif %}
# make django owner of the WORKDIR directory as well.
RUN chown -R django:django ${APP_HOME}