Skip to content

Commit

Permalink
Fix production email settings
Browse files Browse the repository at this point in the history
  • Loading branch information
txels committed Apr 7, 2024
1 parent f7d941d commit cc19346
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions shipanaro/settings_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(",")

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cc19346

Please sign in to comment.