-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
236 lines (234 loc) · 5.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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
services:
django-app:
image: django-app:latest
build:
context: .
dockerfile: ./django_app/Dockerfile
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
core-api:
condition: service_healthy
networks:
- redbox-app-network
env_file:
- .env
volumes:
- /app/django_app/frontend/node_modules
- ./django_app:/app/django_app/
ports:
- "8090:8090"
healthcheck:
test: curl --fail http://localhost:8090/health/ || exit 1
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
db:
image: postgres:13
env_file:
- .env
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
networks:
- redbox-app-network
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 30s
requirements:
image: python:3.12
profiles:
- utils
volumes:
- ./:/app/:z
# mlflow:
# image: mlflow_server
# build:
# context: .
# dockerfile: ./mlflow/Dockerfile
# args:
# - OPENAI_API_KEY=${OPENAI_API_KEY:-}
# env_file:
# - .env
# ports:
# - 5010:5010
# - 5020:5020
worker:
image: redbox-worker:latest
build:
context: .
dockerfile: worker/Dockerfile
args:
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-}
env_file:
- path: .env.integration
required: false
- path: .env
required: false
depends_on:
elasticsearch:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
networks:
- redbox-app-network
restart: unless-stopped
core-api:
image: redbox-core-api:latest
build:
context: .
dockerfile: core-api/Dockerfile
args:
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-}
ports:
- 5002:5002
environment:
- PORT=5002
env_file:
- path: .env.integration
required: false
- path: .env
required: false
networks:
- redbox-app-network
depends_on:
elasticsearch:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
worker:
condition: service_started
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:5002/health || exit 1
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
minio:
image: minio/minio
expose:
- "9000"
- "9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ACCESS_KEY=minioadmin
- MINIO_SECRET_KEY=minioadmin
command: server --console-address ":9001" /data
networks:
- redbox-app-network
volumes:
- ./data/objectstore:/data
restart: unless-stopped
healthcheck:
test: [ "CMD", "mc", "ready", "local" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 30s
elasticsearch:
image: elasticsearch:8.12.0
volumes:
- ./data/elastic/:/usr/share/elasticsearch/data:Z
ports:
- 9200:9200
- 9300:9300
environment:
# node.name: elasticsearch
- ES_JAVA_OPTS=-Xms512m -Xmx512m
# ELASTIC__PASSWORD: ${ELASTIC__PASSWORD:-}
- bootstrap.memory_lock=true
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.enrollment.enabled=false
- cluster.routing.allocation.disk.threshold_enabled=false
networks:
- redbox-app-network
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:9200/_cluster/health || exit 1
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
kibana:
image: kibana:8.12.0
ports:
- 5601:5601
environment:
# KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
# ELASTICSEARCH_PASSWORD: ${ELASTIC__PASSWORD:-}
# ELASTICSEARCH_HOSTS: "http://elasticsearch:9200"
# XPACK_SECURITY_ENABLED: "false"
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: 19264f57-b71d-46e1-8f20-33be19131a6c
networks:
- redbox-app-network
depends_on:
elasticsearch:
condition: service_healthy
restart: unless-stopped
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis:/data/redis
env_file:
- path: .env.integration
required: false
- path: .env
required: false
networks:
- redbox-app-network
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 60s
embeddings:
image: localai/localai:v2.18.1-aio-cpu #localai/localai:v2.18.1 should allow use of sentencetransformers backend
expose:
- "8080"
ports:
- "8080:8080"
environment:
- MODELS=/aio/cpu/embeddings.yaml #Use defaults embedding model for aio image. Only aio images available in ARM architecture
- MINIO_SECRET_KEY=minioadmin
- DEBUG=true
networks:
- redbox-app-network
volumes:
- ./data/embeddings/models:/models:cached
- ./data/embeddings/config:/config
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
interval: 1m
timeout: 20m
retries: 5
networks:
redbox-app-network:
driver: bridge
volumes:
elasticsearch:
redbox-app-data:
local_postgres_data: {}
mlflow-data:
redis:
driver: local
redis-insight: