-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-example.yml
98 lines (90 loc) · 2.01 KB
/
docker-compose-example.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
version: '3.7'
services:
nginx:
image: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./compose/production/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./files/static:/srv/static
- ./files/media:/srv/media
depends_on:
- daphne
db:
image: postgres
restart: unless-stopped
volumes:
- ./db:/var/lib/postgresql/data/
env_file:
- compose/production/.env
redis:
image: redis
daphne:
image: matman_daphne
restart: unless-stopped
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
command: /start-daphne.sh
depends_on:
- redis
- db
env_file:
- compose/production/.env
volumes:
- ./matman:/app
- ./files/static:/app/files/static
- ./files/media:/app/files/media
# https://testdriven.io/courses/django-celery/docker/
celery_worker:
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: matman_celery_worker
command: /start-celeryworker.sh
depends_on:
- redis
- db
- daphne
env_file:
- compose/production/.env
volumes:
- ./matman:/app
- ./files/static:/app/files/static
- ./files/media:/app/files/media
celery_beat:
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: matman_celery_beat
command: /start-celerybeat.sh
depends_on:
- redis
- db
- daphne
env_file:
- compose/production/.env
volumes:
- ./matman:/app
- ./files/static:/app/files/static
- ./files/media:/app/files/media
flower:
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: matman_flower
command: /start-flower.sh
depends_on:
- redis
- db
- celery_beat
- celery_worker
env_file:
- compose/production/.env
volumes:
- ./matman:/app
ports:
- 5555:5555