mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-04 20:20:18 +03:00
Add conditional so that we only create the folder when media is served by nginx Docker service
from project-generationx-options.rst -> "If you choose no cloud provider and docker, the production stack will serve the media files via an nginx Docker service"
This commit is contained in:
parent
952ca20b27
commit
259271f190
|
@ -119,8 +119,10 @@ 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}
|
||||
|
|
Loading…
Reference in New Issue
Block a user