-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.32 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
services:
rag_gateway:
build: .
container_name: rag_gateway
restart: always
depends_on:
ollama:
condition: service_started
postgres:
condition: service_healthy
environment:
OLLAMA_API_URL: http://ollama:11434/api/generate
OLLAMA_MODEL: llama3.1
DATABASE_URL: postgresql://raguser:ragpassword@postgres:5432/ragdb
USE_PG_STORAGE: "true"
env_file:
- .env
ports:
- "8010:8010" # FastAPI
- "8501:8501" # Streamlit
volumes:
- ./data:/app/data
- ./logs:/app/logs
command: >
python ra3g.py --api-port 8010 --ui-port 8501
postgres:
image: postgres:15-alpine
container_name: rag_postgres
restart: always
environment:
POSTGRES_USER: raguser
POSTGRES_PASSWORD: ragpassword
POSTGRES_DB: ragdb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init_db.sql:/docker-entrypoint-initdb.d/init_db.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U raguser -d ragdb"]
interval: 5s
timeout: 5s
retries: 5
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: always
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
volumes:
ollama_data:
postgres_data: