forked from rubra-ai/rubra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
173 lines (159 loc) · 3.88 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
version: '3.8'
services:
standalone:
container_name: milvus
image: milvusdb/milvus:v2.3.3
command: ['milvus', 'run', 'standalone']
security_opt:
- seccomp:unconfined
environment:
ETCD_USE_EMBED: 'true'
ETCD_DATA_DIR: '/etcd'
ETCD_CONFIG_PATH: '/milvus/configs/embedEtcd.yaml'
COMMON_STORAGETYPE: 'local'
volumes:
- milvus:/var/lib/milvus
- ./milvus.yaml:/milvus/configs/milvus.yaml
- etcd:/etcd
- ${DOCKER_VOLUME_DIRECTORY:-.}/embedEtcd.yaml:/milvus/configs/embedEtcd.yaml
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
ports:
- '19530:19530'
- '9091:9091'
networks:
- rubra
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
mongodb:
image: mongo
container_name: mongodb
ports:
- '27017:27017'
volumes:
- mongodb:/data/db
networks:
- rubra
redis:
image: redis
container_name: redis
command: redis-server --appendonly yes
ports:
- '6379:6379'
networks:
- rubra
litellm:
image: ghcr.io/berriai/litellm:main-v1.22.9
ports:
- '8002:8002'
container_name: litellm
volumes:
- ./llm-config.yaml:/app/config.yaml
command: ["--config", "/app/config.yaml", "--port", "8002", "--num_workers", "8"]
healthcheck:
test: ["CMD-SHELL", "litellm --health --port 8002"]
interval: 30s
timeout: 30s
retries: 3
start_period: 40s
networks:
- rubra
text-embedding-api:
build:
context: ./services/backend/text_embedding_api
dockerfile: Dockerfile
container_name: text-embedding-api
image: ghcr.io/rubra-ai/rubra/text_embedding_api:${RUBRA_TAG:-main}
ports:
- '8020:8020'
environment:
- MODEL_NAME=sentence-transformers/all-MiniLM-L6-v2
networks:
- rubra
vector-db-api:
build:
context: ./services/backend/vector_db_api
additional_contexts:
- core=./core
dockerfile: Dockerfile
container_name: vector-db-api
image: ghcr.io/rubra-ai/rubra/vector_db_api:${RUBRA_TAG:-main}
ports:
- '8010:8010'
environment:
- MILVUS_HOST=milvus
- EMBEDDING_HOST=text-embedding-api
networks:
- rubra
task-executor:
build:
context: ./services/backend/task_executor
additional_contexts: # requires compose >=v2.17.0
- core=./core
dockerfile: Dockerfile
image: ghcr.io/rubra-ai/rubra/task_executor:${RUBRA_TAG:-main}
container_name: task-executor
environment:
- REDIS_HOST=redis
- MONGODB_HOST=mongodb
- LITELLM_HOST=litellm
- EMBEDDING_HOST=text-embedding-api
- VECTOR_DB_HOST=vector-db-api
- MILVUS_HOST=milvus
- LITELLM_MASTER_KEY=abc
depends_on:
- redis
- mongodb
networks:
- rubra
api-server:
build:
context: ./services/backend/api_server
additional_contexts:
- core=./core
dockerfile: Dockerfile
image: ghcr.io/rubra-ai/rubra/api_server:${RUBRA_TAG:-main}
container_name: api-server
environment:
- REDIS_HOST=redis
- MONGODB_HOST=mongodb
- LITELLM_HOST=litellm
- MILVUS_HOST=milvus
ports:
- '8000:8000'
depends_on:
litellm:
condition: service_healthy
task-executor:
condition: service_started
networks:
- rubra
ui:
build:
context: ./services/frontend/ui
dockerfile: Dockerfile
image: ghcr.io/rubra-ai/rubra/ui:${RUBRA_TAG:-main}
container_name: ui
environment:
- RUBRA_BACKEND_HOST=api-server
ports:
- "8501:8501"
depends_on:
- api-server
networks:
- rubra
networks:
rubra:
name: rubra
driver: bridge
volumes:
milvus:
mongodb:
etcd: