-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
126 lines (114 loc) · 2.54 KB
/
docker-compose.yml
File metadata and controls
126 lines (114 loc) · 2.54 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: '3.8'
x-app-common: &app-common
image: deepmtg-app:dev
build:
context: .
env_file:
- .env
volumes:
- .:/app
depends_on:
- db
- redis
networks:
- deepmtg_network
- llm_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services:
db:
image: postgres:16
container_name: postgres_db
restart: unless-stopped
env_file:
- .env
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- deepmtg_postgres_data:/var/lib/postgresql/data
networks:
- deepmtg_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:7
container_name: redis
restart: always
networks:
- deepmtg_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
web:
<<: *app-common
container_name: django_app
command: python manage.py runserver 0.0.0.0:8000
ports:
- "127.0.0.1:8001:8000"
depends_on:
- db
- redis
celery_worker:
<<: *app-common
container_name: celery_worker
command: celery -A app worker -Q default --loglevel=info --concurrency=8 -n worker_default@%h
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
celery_llm_worker:
<<: *app-common
container_name: celery_llm_worker
command: celery -A app worker -Q llm --loglevel=info --concurrency=1 --pool=prefork --max-tasks-per-child=50 -n worker_llm@%h
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
celery_beat:
<<: *app-common
container_name: celery_beat
command: celery -A app beat --loglevel=info
restart: always
qdrant:
image: qdrant/qdrant:latest
volumes:
- deepmtg_qdrant_data:/qdrant/storage
restart: always
networks:
- deepmtg_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
deepmtg_postgres_data:
deepmtg_qdrant_data:
networks:
deepmtg_network:
llm_net:
external: true