-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (97 loc) · 2.03 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3"
volumes:
blog_local_postgres_data: {}
blog_local_postgres_data_backups: {}
django_media: {}
services:
django:
build:
context: .
dockerfile: ./compose/django/Dockerfile
image: blog_local_django
container_name: blog_local_django
depends_on:
- postgres
volumes:
- .:/app:z
env_file:
- ./.envs/.django
- ./.envs/.postgres
expose:
- 8000
ports:
- "8000:8000"
command: /start
postgres:
build:
context: .
dockerfile: ./compose/postgres/Dockerfile
image: blog_production_postgres
container_name: blog_local_postgres
volumes:
- blog_local_postgres_data:/var/lib/postgresql/data
- blog_local_postgres_data_backups:/backups
env_file:
- ./.envs/.postgres
nginx:
build:
context: .
dockerfile: ./compose/nginx/Dockerfile
image: django_nginx
container_name: django_nginx
restart: always
depends_on:
- django
ports:
- "80:80"
volumes:
- django_media:/usr/src/app
redis:
image: redis:latest
container_name: blog_local_redis
ports:
- "6379:6379"
celery_worker:
build:
context: .
dockerfile: ./compose/django/Dockerfile
image: django_celery_worker
command: /start-celeryworker
volumes:
- .:/app:z
env_file:
- ./.envs/.django
- ./.envs/.postgres
depends_on:
- redis
- postgres
celery_beat:
build:
context: .
dockerfile: ./compose/django/Dockerfile
image: django_celery_beat
command: /start-celerybeat
volumes:
- .:/app:z
env_file:
- ./.envs/.django
- ./.envs/.postgres
depends_on:
- redis
- postgres
celery_flower:
build:
context: .
dockerfile: ./compose/django/Dockerfile
image: django_celery_flower
command: /start-flower
volumes:
- .:/app:z
env_file:
- ./.envs/.django
- ./.envs/.postgres
ports:
- "5555:5555"
depends_on:
- redis
- postgres