From f6f15d3979053b003ec0b30dfb1c4baff80fbed3 Mon Sep 17 00:00:00 2001 From: Alexander-D-Karpov Date: Sun, 15 Oct 2023 23:02:53 +0300 Subject: [PATCH] added email settings to compose --- .env.example | 3 +++ compose/production/traefik/traefik.yml | 25 ------------------------- config/settings/base.py | 12 ++++++++++++ 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.env.example b/.env.example index d68d0e4..dd17f0f 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,6 @@ USE_DOCKER=no EMAIL_HOST=127.0.0.1 EMAIL_PORT=1025 SENTRY_DSN= +EMAIL_PASSWORD= +EMAIL_USER= +EMAIL_USE_SSL=false diff --git a/compose/production/traefik/traefik.yml b/compose/production/traefik/traefik.yml index 7b13c4e..0eb006e 100644 --- a/compose/production/traefik/traefik.yml +++ b/compose/production/traefik/traefik.yml @@ -11,10 +11,6 @@ entryPoints: entryPoint: to: web-secure - web-secure: - # https - address: ":443" - flower: address: ":5555" @@ -29,27 +25,6 @@ certificatesResolvers: entryPoint: web http: - routers: - web-secure-router: - rule: "Host(`akarpov.ru`) || Host(`www.akarpov.ru`)" - entryPoints: - - web-secure - middlewares: - - csrf - service: django - tls: - # https://docs.traefik.io/master/routing/routers/#certresolver - certResolver: letsencrypt - - flower-secure-router: - rule: "Host(`akarpov.ru`)" - entryPoints: - - flower - service: flower - tls: - # https://docs.traefik.io/master/routing/routers/#certresolver - certResolver: letsencrypt - middlewares: csrf: # https://docs.traefik.io/master/middlewares/headers/#hostsproxyheaders diff --git a/config/settings/base.py b/config/settings/base.py index 69452e4..779e29f 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -307,6 +307,18 @@ ) # https://docs.djangoproject.com/en/dev/ref/settings/#email-timeout EMAIL_TIMEOUT = 5 +EMAIL_HOST_PASSWORD = env( + "EMAIL_PASSWORD", + default="", +) +EMAIL_HOST_USER = env( + "EMAIL_USER", + default="", +) +EMAIL_USE_SSL = env( + "EMAIL_USE_SSL", + default=False, +) # ADMIN # ------------------------------------------------------------------------------