-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (44 loc) · 1.04 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
version: '3.8'
services:
ppedetection:
build: ./PPEDetection
command: uvicorn main:app --host 0.0.0.0 --port 8080
ports:
- 8080:8080
environment:
- BROKER_URI=amqp://admin:123qweasdzxc@rabbitmq
- BACKEND_URI=redis://redis
depends_on:
- redis
- rabbitmq
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
worker:
build: ./PPEDetection
command: celery -A src.queue.worker worker --uid=nobody --gid=nogroup --hostname=worker@%h --loglevel=INFO
environment:
- BROKER_URI=amqp://admin:123qweasdzxc@rabbitmq
- BACKEND_URI=redis://redis
depends_on:
- ppedetection
- redis
- rabbitmq
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
redis:
image: redis:6-alpine
ports:
- 6379:6379
rabbitmq:
image: rabbitmq:3.8.19-alpine
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=123qweasdzxc
ports:
- 5672:5672