From cc19346a25774117bfb53dab080ffd96e3b28c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Barrobe=CC=81s?= Date: Sun, 7 Apr 2024 09:35:46 +0200 Subject: [PATCH] Fix production email settings --- Makefile | 2 +- shipanaro/settings_django.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3eaec08..f19ec30 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ k8s-restart: kubectl rollout restart deploy/${IMAGE} serve: - granian --host 0.0.0.0 --port 8000 --interface wsgi shipanaro.wsgi:application --workers 4 --threads 4 + gunicorn --bind 0.0.0.0:8000 --workers 2 shipanaro.wsgi update: git pull || echo "Cannot pull" diff --git a/shipanaro/settings_django.py b/shipanaro/settings_django.py index 59d1f15..d24d527 100644 --- a/shipanaro/settings_django.py +++ b/shipanaro/settings_django.py @@ -28,6 +28,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = env.bool("SHIPANARO_DEBUG", False) +DEBUG_EMAIL = env.bool("SHIPANARO_DEBUG_EMAIL", False) ALLOWED_HOSTS = env("SHIPANARO_ALLOWED_HOSTS", "tripulacio.pirates.cat").split(",") @@ -147,8 +148,7 @@ MEDIA_URL = "/media/" -# TODO: prod settings? is this used? the package django-ses in not in Pipfile -if DEBUG: +if DEBUG_EMAIL: EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" else: EMAIL_BACKEND = "django_ses.SESBackend"