-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (61 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
63 lines (61 loc) · 1.37 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
version: '3.8'
services:
# PostgreSQL with pgvector extension
postgres:
image: pgvector/pgvector:pg16
container_name: postgres-pgvector
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rag_db
logging:
options:
max-size: 10m
max-file: "3"
ports:
- "6432:5432"
volumes:
- ./postgres/data:/var/lib/postgresql/data
- ./postgres/scripts:/docker-entrypoint-initdb.d
healthcheck:
test: "pg_isready -U postgres -d rag_db"
interval: 2s
timeout: 5s
retries: 5
networks:
- rag-net
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
# Ollama service (CPU-only for laptop)
ollama:
image: ollama/ollama:latest
container_name: ollama-service
restart: unless-stopped
ports:
- "11431:11434"
volumes:
- ./ollama:/root/.ollama
entrypoint: "/bin/sh -c"
command: |
"ollama serve &
sleep 2 &&
ollama pull gemma3:4b-it-q4_K_M &&
ollama pull mxbai-embed-large:latest
wait"
networks:
- rag-net
deploy:
resources:
limits:
memory: 8G # Ollama will use up to 8GB for models
reservations:
memory: 4G
networks:
rag-net:
driver: bridge
name: rag-network