-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathdocker-compose.knowledge.yml
More file actions
98 lines (91 loc) · 2.76 KB
/
docker-compose.knowledge.yml
File metadata and controls
98 lines (91 loc) · 2.76 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
# Knowledge base override — merge with docker-compose.yml via:
# docker compose -f docker-compose.yml -f docker-compose.knowledge.yml up -d
#
# This file adds opensearch and document-api services, enables OpenSearch
# config in assistant-api, and enables the knowledge feature flag in the UI.
services:
# OpenSearch — required for knowledge base search
opensearch:
image: opensearchproject/opensearch:2.11.1
platform: linux/amd64
container_name: rapida__opensearch
ports:
- "9200:9200"
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch
- cluster.initial_master_nodes=opensearch-node1
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- plugins.security.disabled=true
- bootstrap.system_call_filter=false
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ${HOME}/rapida-data/assets/opensearch:/usr/share/opensearch/data
networks:
- api-network
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"\\|\"status\":\"yellow\"'"]
interval: 10s
timeout: 5s
retries: 5
# Document API — RAG / knowledge processing
document-api:
platform: linux/amd64
build:
context: .
dockerfile: docker/document-api/Dockerfile
container_name: rapida__document-api
ports:
- "9010:9010"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
opensearch:
condition: service_healthy
volumes:
- ./docker/document-api/config.yaml:/app/env/document.yaml:ro
- ${HOME}/rapida-data/assets:/app/rapida-data/assets
networks:
- api-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--method=GET", "-O", "/dev/null", "http://localhost:9010/readiness/"]
interval: 30s
timeout: 3s
retries: 3
# Override assistant-api to inject OpenSearch connection config
assistant-api:
environment:
ENV_PATH: /opt/apps/env/assistant.knowledge.yml
volumes:
- ./docker/assistant-api/assistant.knowledge.yml:/opt/apps/env/assistant.knowledge.yml:ro
depends_on:
opensearch:
condition: service_healthy
document-api:
condition: service_healthy
# Override ui to mount the knowledge-enabled config
ui:
build:
context: .
dockerfile: docker/ui/Dockerfile
args:
EDITION: local-knowledge
depends_on:
- document-api
# Override nginx to wait for document-api
nginx:
depends_on:
- document-api
networks:
api-network:
driver: bridge