mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
Fix nginx media location and storage issue
This commit is contained in:
parent
9663305f1f
commit
8dbc0c494c
|
@ -66,7 +66,7 @@ SECURE_CONTENT_TYPE_NOSNIFF = env.bool(
|
||||||
"DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", default=True
|
"DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", default=True
|
||||||
)
|
)
|
||||||
|
|
||||||
{% if cookiecutter.cloud_provider != 'None' -%}
|
{% if cookiecutter.cloud_provider != 'None' and cookiecutter.cloud_provider != 'nginx' -%}
|
||||||
# STORAGES
|
# STORAGES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://django-storages.readthedocs.io/en/latest/#installation
|
# https://django-storages.readthedocs.io/en/latest/#installation
|
||||||
|
|
|
@ -16,7 +16,7 @@ services:
|
||||||
image: {{ cookiecutter.project_slug }}_production_django
|
image: {{ cookiecutter.project_slug }}_production_django
|
||||||
{%- if cookiecutter.cloud_provider == 'nginx' %}
|
{%- if cookiecutter.cloud_provider == 'nginx' %}
|
||||||
volumes:
|
volumes:
|
||||||
- production_django_media:{{ cookiecutter.project_slug }}/media
|
- production_django_media:/app/{{ cookiecutter.project_slug }}/media
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
Loading…
Reference in New Issue
Block a user