-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
294 lines (272 loc) · 6.75 KB
/
docker-compose.yml
File metadata and controls
294 lines (272 loc) · 6.75 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
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
volumes:
n8n_storage:
ollama_storage:
qdrant_storage:
open-webui:
valkey-data:
langfuse_postgres_data:
x-n8n: &service-n8n
image: n8nio/n8n:latest
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_USER=postgres
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- DB_POSTGRESDB_DATABASE=postgres
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_PERSONALIZATION_ENABLED=false
- N8N_ENCRYPTION_KEY
- N8N_USER_MANAGEMENT_JWT_SECRET
- WEBHOOK_URL=${N8N_HOSTNAME:+https://}${N8N_HOSTNAME:-http://localhost:5678}
x-ollama: &service-ollama
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
ports:
- 11434:11434
environment:
- OLLAMA_CONTEXT_LENGTH=8192
volumes:
- ollama_storage:/root/.ollama
x-init-ollama: &init-ollama
image: ollama/ollama:latest
container_name: ollama-pull-llama
volumes:
- ollama_storage:/root/.ollama
entrypoint: /bin/sh
command:
- "-c"
- "sleep 3; OLLAMA_HOST=ollama:11434 ollama pull qwen2.5:7b-instruct-q4_K_M; OLLAMA_HOST=ollama:11434 ollama pull nomic-embed-text"
services:
open-webui:
image: ghcr.io/open-webui/open-webui:main
restart: unless-stopped
container_name: open-webui
networks:
- gainsec-ai-stack
ports:
- "3000:8080"
environment:
- ENABLE_AUDIO_TRANSCRIPTION=true
- WHISPER_MODEL=large
- CUSTOM_COMPUTE_TYPE=flat16
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- open-webui:/app/backend/data
- ./openwebui-tools:/app/tools
n8n:
<<: *service-n8n
container_name: n8n
networks:
- gainsec-ai-stack
restart: unless-stopped
ports:
- 5678:5678
volumes:
- n8n_storage:/home/node/.n8n
- ./n8n/backup:/backup
- ./shared:/data/shared
qdrant:
image: qdrant/qdrant
container_name: qdrant
networks:
- gainsec-ai-stack
restart: unless-stopped
ports:
- 6333:6333
volumes:
- qdrant_storage:/qdrant/storage
neo4j:
image: neo4j:latest
networks:
- gainsec-ai-stack
volumes:
- ./neo4j/logs:/logs
- ./neo4j/config:/config
- ./neo4j/data:/data
- ./neo4j/plugins:/plugins
environment:
- NEO4J_AUTH=${NEO4J_AUTH:-"neo4j/your_password"}
ports:
- 7474:7474
- 7687:7687
restart: always
postgres:
image: postgres:${POSTGRES_VERSION:-latest}
networks:
- gainsec-ai-stack
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
ports:
- 127.0.0.1:5433:5432
volumes:
- langfuse_postgres_data:/var/lib/postgresql/data
redis:
container_name: redis
networks:
- gainsec-ai-stack
image: docker.io/valkey/valkey:8-alpine
command: valkey-server --save 30 1 --loglevel warning
restart: unless-stopped
volumes:
- valkey-data:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 10s
retries: 10
searxng:
container_name: searxng
networks:
- gainsec-ai-stack
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
ollama-cpu:
profiles: ["cpu"]
<<: *service-ollama
networks:
- gainsec-ai-stack
ollama-gpu:
profiles: ["gpu-nvidia"]
<<: *service-ollama
networks:
- gainsec-ai-stack
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
ollama-gpu-amd:
profiles: ["gpu-amd"]
<<: *service-ollama
networks:
- gainsec-ai-stack
image: ollama/ollama:rocm
devices:
- "/dev/kfd"
- "/dev/dri"
ollama-pull-llama-cpu:
profiles: ["cpu"]
<<: *init-ollama
networks:
- gainsec-ai-stack
depends_on:
- ollama-cpu
ollama-pull-llama-gpu:
profiles: ["gpu-nvidia"]
<<: *init-ollama
networks:
- gainsec-ai-stack
depends_on:
- ollama-gpu
ollama-pull-llama-gpu-amd:
profiles: [gpu-amd]
<<: *init-ollama
networks:
- gainsec-ai-stack
image: ollama/ollama:rocm
depends_on:
- ollama-gpu-amd
sd-a1111:
image: universonic/stable-diffusion-webui:latest
container_name: sd-a1111
networks:
- gainsec-ai-stack
user: "1000:1000"
ports:
- "7860:7860"
- "8081:8080"
volumes:
- ./stable-diffusion/models:/app/stable-diffusion-webui/models
- ./stable-diffusion/outputs:/app/stable-diffusion-webui/outputs
- ./stable-diffusion/embeddings:/app/stable-diffusion-webui/embeddings
- ./stable-diffusion/extensions:/app/stable-diffusion-webui/extensions
- ./stable-diffusion/configs:/app/stable-diffusion-webui/configs
- ./stable-diffusion/cache:/root/.cache
- ./stable-diffusion/repositories:/app/stable-diffusion-webui/repositories
command: --xformers --api
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
whisper-server:
image: onerahmet/openai-whisper-asr-webservice:latest-gpu
container_name: whisper-server
networks:
- gainsec-ai-stack
ports:
- "9002:9000"
environment:
- ASR_MODEL=large
- ASR_ENGINE=openai_whisper
volumes:
- ./whisper-models:/root/.cache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
crawl4ai:
image: unclecode/crawl4ai:latest
container_name: crawl4ai
networks:
- gainsec-ai-stack
ports:
- "8860:11235" # Host 8860 → Container 11235
volumes:
- ./shared/crawl:/data # Save logs, output, screenshots, etc.
shm_size: "1g"
restart: unless-stopped
networks:
gainsec-ai-stack:
external: true