-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
150 lines (143 loc) · 3.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
150 lines (143 loc) · 3.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
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
services:
# PostgreSQL with pgvector for conversation history and embeddings
postgres:
image: pgvector/pgvector:pg16
container_name: agentic_rag_postgres
environment:
POSTGRES_USER: rag_user
POSTGRES_PASSWORD: rag_pass
POSTGRES_DB: ragdb
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=en_US.UTF-8"
ports:
- "5432:5432"
volumes:
- rag_pgdata:/var/lib/postgresql/data
- ./docker/init-scripts:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rag_user -d ragdb"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- rag_network
restart: unless-stopped
# OpenSearch for full-text search and vector search
opensearch:
image: opensearchproject/opensearch:2.15.0
container_name: agentic_rag_opensearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- DISABLE_SECURITY_PLUGIN=true
- DISABLE_INSTALL_DEMO_CONFIG=true
ports:
- "9200:9200"
- "9600:9600"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- rag_opensearch_data:/usr/share/opensearch/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 15s
timeout: 10s
retries: 5
start_period: 60s
networks:
- rag_network
restart: unless-stopped
# LLM Mock Service - Emulates Azure OpenAI / LLM API
llm-mock:
build:
context: ./mocks/llm-mock
dockerfile: Dockerfile
container_name: agentic_rag_llm_mock
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=mock
ports:
- "8081:8080"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')"]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
networks:
- rag_network
restart: unless-stopped
# Cloud Engine Mock - Emulates AWS/Azure cloud services
cloud-mock:
build:
context: ./mocks/cloud-mock
dockerfile: Dockerfile
container_name: agentic_rag_cloud_mock
environment:
- SERVER_PORT=8080
- SPRING_PROFILES_ACTIVE=mock
ports:
- "8083:8080"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')"]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
networks:
- rag_network
restart: unless-stopped
# Redis (optional) - For caching and session management
redis:
image: redis:7-alpine
container_name: agentic_rag_redis
ports:
- "6379:6379"
volumes:
- rag_redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 10s
networks:
- rag_network
restart: unless-stopped
# OpenSearch Dashboards (optional) - For visualizing search data
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.15.0
container_name: agentic_rag_dashboards
ports:
- "5601:5601"
environment:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
depends_on:
opensearch:
condition: service_healthy
networks:
- rag_network
restart: unless-stopped
profiles:
- dev
volumes:
rag_pgdata:
driver: local
rag_opensearch_data:
driver: local
rag_redis_data:
driver: local
networks:
rag_network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16