-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose.yml
221 lines (219 loc) · 6.21 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
services:
unstructured:
image: quay.io/unstructured-io/unstructured-api:latest
ports:
- 8000:8000
networks:
- redbox-app-network
django-app:
image: django-app:latest
build:
context: .
dockerfile: ./django_app/Dockerfile
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
elasticsearch:
condition: service_healthy
networks:
- redbox-app-network
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
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
lit-ssr:
image: lit-ssr:latest
build:
context: .
dockerfile: ./lit_ssr/Dockerfile
user: "node"
networks:
- redbox-app-network
ports:
- "3002:3002"
restart: unless-stopped
env_file:
- path: .env
required: false
db:
image: postgres:13
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
volumes:
- local_postgres_data:/var/lib/postgresql/data:Z
networks:
- redbox-app-network
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-U", "redbox-core", "-d", "db_prod" ]
interval: 5s
timeout: 30s
retries: 24
start_period: 30s
requirements:
image: python:3.12
profiles:
- utils
volumes:
- ./:/app/:z
worker:
image: redbox-worker:latest
build:
context: .
dockerfile: django_app/Dockerfile
command: "venv/bin/django-admin qcluster"
env_file:
- path: tests/.env.integration
required: false
- path: .env
required: false
depends_on:
unstructured:
condition: service_started
elasticsearch:
condition: service_healthy
minio:
condition: service_healthy
django-app:
condition: service_healthy
db:
condition: service_healthy
networks:
- redbox-app-network
restart: unless-stopped
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
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
langfuse:
image: langfuse/langfuse:2
depends_on:
db:
condition: service_healthy
ports:
- "3000:3000"
networks:
- redbox-app-network
environment:
- DATABASE_URL=postgresql://redbox-core:insecure@db:5432/langfuse
- NEXTAUTH_SECRET=mysecret
- SALT=mysalt
- ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 # generate via `openssl rand -hex 32`
- NEXTAUTH_URL=http://localhost:3000
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-false}
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}
- LANGFUSE_INIT_ORG_ID=${LANGFUSE_INIT_ORG_ID:-Redbox}
- LANGFUSE_INIT_ORG_NAME=${LANGFUSE_INIT_ORG_NAME:-Redbox}
- LANGFUSE_INIT_PROJECT_ID=${LANGFUSE_INIT_PROJECT_ID:-Redbox}
- LANGFUSE_INIT_PROJECT_NAME=${LANGFUSE_INIT_PROJECT_NAME:-Redbox}
- LANGFUSE_INIT_PROJECT_PUBLIC_KEY=${LANGFUSE_INIT_PROJECT_PUBLIC_KEY:-pk-lf-6f517f1f-3fd0-4b00-9c2d-e9756132cc11}
- LANGFUSE_INIT_PROJECT_SECRET_KEY=${LANGFUSE_INIT_PROJECT_SECRET_KEY:-sk-lf-878345f5-fa2c-46f0-8193-d6be00910ab0} #For local only
- LANGFUSE_INIT_USER_EMAIL=${LANGFUSE_INIT_USER_EMAIL:-me@redbox.localhost}
- LANGFUSE_INIT_USER_NAME=${LANGFUSE_INIT_USER_NAME:-me}
- LANGFUSE_INIT_USER_PASSWORD=${LANGFUSE_INIT_USER_PASSWORD:-insecure-langfuse}
networks:
redbox-app-network:
driver: bridge
volumes:
elasticsearch:
redbox-app-data:
local_postgres_data: {}