mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 03:24:01 +03:00
mailhog-as-docker-container
This commit is contained in:
parent
dab119a4f3
commit
a023ed7a35
|
@ -23,12 +23,15 @@ SECRET_KEY = env('DJANGO_SECRET_KEY', default='CHANGEME!!!')
|
|||
|
||||
# Mail settings
|
||||
# ------------------------------------------------------------------------------
|
||||
EMAIL_HOST = 'localhost'
|
||||
|
||||
EMAIL_PORT = 1025
|
||||
{%if cookiecutter.use_mailhog == 'n' -%}
|
||||
{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'y' %}
|
||||
EMAIL_HOST = 'mailhog'
|
||||
{% else %}
|
||||
EMAIL_HOST = 'localhost'
|
||||
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
||||
default='django.core.mail.backends.console.EmailBackend')
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
|
||||
# CACHING
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -42,3 +42,10 @@ services:
|
|||
links:
|
||||
- postgres
|
||||
{% endif %}
|
||||
|
||||
{% if cookiecutter.use_mailhog == 'y' %}
|
||||
mailhog:
|
||||
image: mailhog/mailhog
|
||||
ports:
|
||||
- "8025:8025"
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user