-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (72 loc) · 1.55 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
services:
nginx:
image: "nginx:latest"
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl --fail http://localhost:80/health || exit 1" ]
interval: 1m
timeout: 5s
retries: 10
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- watchdog_node
ports:
- "80:8000"
app:
restart: unless-stopped
build:
context: .
dockerfile: docker/django/Dockerfile
environment:
DJANGO_ENV: dev
ports:
- "8000:8000"
depends_on:
- db
- redis
- nginx
volumes:
- django-static:/var/www/django/static
- .:/app
networks:
- watchdog_node
env_file: config/.env
command:
- python -Wd manage.py runserver 0.0.0.0:8000
healthcheck:
test: [ "CMD", "curl --fail http://localhost:8000/admin || exit 1" ]
interval: 1m
timeout: 5s
retries: 10
db:
image: "postgres:latest"
restart: unless-stopped
env_file: config/.env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 1m
timeout: 5s
retries: 10
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- watchdog_node
redis:
image: "redis:latest"
restart: unless-stopped
env_file: config/.env
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
interval: 1m
timeout: 5s
retries: 10
ports:
- "6379:6379"
networks:
watchdog_node:
volumes:
postgres-data:
django-static: