-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
42 lines (39 loc) · 998 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: '3.7'
services:
django:
build:
context: .
dockerfile: ./Dockerfile
target: development
image: {{cookiecutter.django_project_name}}/django:development
ports:
- "8000:8000"
volumes:
# Project code
- ./{{cookiecutter.django_project_name}}:/django/{{cookiecutter.django_project_name}}
- django_media_root:/django/media-root/
# stdin_open and tty will be useful for debugging
stdin_open: true
tty: true
# So it can return when a SyntaxError breaks runserver
restart: on-failure
command:
- python
- manage.py
- runserver_plus # django-extensions
- 0.0.0.0:8000
postgres:
image: postgres:11-alpine
volumes:
- postgres_data:/var/lib/postgresql/data:rw
redis:
image: redis:5-alpine
{% if cookiecutter.use_mailhog == 'y' %}
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- "8025:8025"
{% endif %}
volumes:
postgres_data: {}
django_media_root: {}