-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (89 loc) · 2.22 KB
/
docker-compose.yml
File metadata and controls
98 lines (89 loc) · 2.22 KB
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.9"
services:
web:
build: .
# Dockerfile already: migrate + collectstatic + gunicorn (binds to 0.0.0.0:$PORT)
environment:
PORT: "8000" # needed because your Dockerfile CMD uses $PORT
env_file: [.env]
ports: ["8000:8000"]
volumes:
- media:/app/media
- staticfiles:/app/staticfiles
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
worker-openai:
build: .
command: celery -A hmva worker -l INFO -Q openai -c 6 --prefetch-multiplier=1 --max-tasks-per-child=200
env_file: [.env]
volumes:
- .:/app
- media:/app/media
depends_on:
redis:
condition: service_healthy
web:
condition: service_started
restart: unless-stopped
worker-io:
build: .
command: celery -A hmva worker -l INFO -Q io -c 2 --prefetch-multiplier=1 --max-tasks-per-child=200
env_file: [.env]
volumes:
- .:/app
- media:/app/media
depends_on:
redis:
condition: service_healthy
web:
condition: service_started
restart: unless-stopped
worker-default:
build: .
command: celery -A hmva worker -l INFO -Q default -c 2 --prefetch-multiplier=1 --max-tasks-per-child=200
env_file: [.env]
volumes:
- media:/app/media
depends_on:
redis:
condition: service_healthy
web:
condition: service_started
restart: unless-stopped
beat:
build: .
command: celery -A hmva beat --loglevel=INFO
env_file: [.env]
volumes:
- media:/app/media
depends_on:
redis:
condition: service_healthy
web:
condition: service_started
restart: unless-stopped
flower:
image: mher/flower:2.0.1
command: ["celery", "--broker=redis://redis:6379/0", "flower", "--address=0.0.0.0", "--port=5555"]
depends_on:
redis:
condition: service_started
restart: unless-stopped
ports:
- "5555:5555"
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
volumes:
- redisdata:/data
restart: unless-stopped
volumes:
media:
staticfiles:
redisdata: