File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
{{cookiecutter.project_name}} Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Template for Django projects based on:
18
18
- [ ` pytest ` ] ( https://docs.pytest.org/en/6.2.x/ ) with basic setup
19
19
- Basic dependencies such ` django ` , ` djangorestframework ` etc.
20
20
- ` docker-compose ` infrastructure file with database ([ PostgreSQL] ( https://www.postgresql.org ) ) and cache ([ Redis] ( https://redis.io ) ).
21
+ - [ mailhog] ( https://github.com/mailhog/MailHog ) for testing emails
21
22
- Dockerfile for application deployment
22
23
- Settings based on environment variables.
23
24
- Health check endpoint at ` /health `
Original file line number Diff line number Diff line change 1
1
from settings .base import *
2
2
3
-
4
3
DEBUG = True
5
4
6
5
ALLOWED_HOSTS = ["*" ]
6
+
7
+ EMAIL_HOST = 'localhost'
8
+ EMAIL_PORT = '1025'
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ services:
5
5
image : postgres:13.2
6
6
container_name : {{cookiecutter.project_name}}-database
7
7
restart : always
8
+ volumes :
9
+ - {{cookiecutter.project_name}}-postgresql:/var/lib/postgresql/data
8
10
environment :
9
11
POSTGRES_PASSWORD : {{cookiecutter.project_name}}
10
12
POSTGRES_USER : {{cookiecutter.project_name}}
@@ -18,3 +20,17 @@ services:
18
20
restart : always
19
21
ports :
20
22
- " 6379:6379"
23
+
24
+ # Email testing
25
+ mailhog :
26
+ image : mailhog/mailhog:v1.0.1
27
+ container_name : { { cookiecutter.project_name } }-mailhog
28
+ volumes :
29
+ - ./docker-maildir:/maildir
30
+ command : [ "-storage=maildir", "-maildir-path=/maildir" ]
31
+ ports :
32
+ - ' 1025:1025'
33
+ - ' 8025:8025'
34
+
35
+ volumes :
36
+ {{cookiecutter.project_name}}-postgresql:
You can’t perform that action at this time.
0 commit comments