mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-18 12:30:57 +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
|
# Mail settings
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
EMAIL_HOST = 'localhost'
|
|
||||||
EMAIL_PORT = 1025
|
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',
|
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
||||||
default='django.core.mail.backends.console.EmailBackend')
|
default='django.core.mail.backends.console.EmailBackend')
|
||||||
{%- endif %}
|
{% endif %}
|
||||||
|
|
||||||
# CACHING
|
# CACHING
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -42,3 +42,10 @@ services:
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if cookiecutter.use_mailhog == 'y' %}
|
||||||
|
mailhog:
|
||||||
|
image: mailhog/mailhog
|
||||||
|
ports:
|
||||||
|
- "8025:8025"
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user