-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (73 loc) · 1.64 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
version: '3.8'
services:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management
hostname: rabbitmq
restart: always
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER
- RABBITMQ_DEFAULT_PASS
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 5s
retries: 3
frontend:
build: ./frontend
container_name: gradio-ui
command: python3 main.py
volumes:
- ./frontend:/app
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
environment:
- BACKEND_PORT
- FRONTEND_PORT
db:
image: mongo:6-jammy
container_name: mongo-result-backend
command: mongod --quiet --logpath /dev/null
ports:
- "27017:27017"
worker:
build: ./worker
container_name: worker
command: celery -A celeryworker.app worker -l warning
# volumes:
# - ./worker:/app
# - /app/models
environment:
- CELERY_BROKER_URL
- CELERY_RESULT_BACKEND
- CLIP_MODEL
depends_on:
rabbitmq:
condition: service_healthy
backend:
build: ./backend
container_name: fastapi-backend
image: backend
command: uvicorn app:app --host 0.0.0.0 --port ${BACKEND_PORT} --reload
volumes:
- ./backend:/app
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
environment:
- CELERY_BROKER_URL
- CELERY_RESULT_BACKEND
depends_on:
- worker
flower:
image: mher/flower:2.0
environment:
- CELERY_BROKER_URL
- FLOWER_PORT
ports:
- "${FLOWER_PORT}:${FLOWER_PORT}"
depends_on:
- worker
- db