Fix a number of issues with Azure storage (#5476)

This commit is contained in:
Bruno Alla 2024-10-21 10:12:29 +01:00 committed by GitHub
parent 1b83a472ec
commit 6f5f1b8576
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -91,6 +91,10 @@ def remove_docker_files():
os.remove(os.path.join(".idea", "runConfigurations", file_name)) os.remove(os.path.join(".idea", "runConfigurations", file_name))
def remove_nginx_docker_files():
shutil.rmtree(os.path.join("compose", "production", "nginx"))
def remove_utility_files(): def remove_utility_files():
shutil.rmtree("utility") shutil.rmtree("utility")
@ -457,6 +461,8 @@ def main():
if "{{ cookiecutter.use_docker }}".lower() == "y": if "{{ cookiecutter.use_docker }}".lower() == "y":
remove_utility_files() remove_utility_files()
if "{{ cookiecutter.cloud_provider }}".lower() != "none":
remove_nginx_docker_files()
else: else:
remove_docker_files() remove_docker_files()

View File

@ -170,7 +170,7 @@ STORAGES = {
"BACKEND": "storages.backends.azure_storage.AzureStorage", "BACKEND": "storages.backends.azure_storage.AzureStorage",
"OPTIONS": { "OPTIONS": {
"location": "media", "location": "media",
"file_overwrite": False, "overwrite_files": False,
}, },
}, },
{%- if cookiecutter.use_whitenoise == 'y' %} {%- if cookiecutter.use_whitenoise == 'y' %}
@ -323,7 +323,7 @@ COMPRESS_FILTERS = {
"js": ["compressor.filters.jsmin.JSMinFilter"], "js": ["compressor.filters.jsmin.JSMinFilter"],
} }
{% endif %} {% endif %}
{%- if cookiecutter.use_whitenoise == 'n' -%} {%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP') -%}
# Collectfasta # Collectfasta
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://github.com/jasongi/collectfasta#installation # https://github.com/jasongi/collectfasta#installation

View File

@ -4,7 +4,7 @@
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
{%- if cookiecutter.use_whitenoise == 'n' %} {%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP') %}
Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta
{%- endif %} {%- endif %}
{%- if cookiecutter.use_sentry == "y" %} {%- if cookiecutter.use_sentry == "y" %}