Skip to content

Commit 2e37997

Browse files
author
krasch
committed
Adding ollama as a service to docker compose file
1 parent 71a142f commit 2e37997

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,20 @@ Configure in the sidebar:
118118

119119
## 🐳 Docker Support
120120

121-
Run Ragadoc in Docker:
121+
Run Ragadoc and ollama in Docker:
122122

123123
```bash
124-
# Build the image
124+
# Build the application image
125125
docker-compose build
126126

127-
# Start the application
127+
# Start ollama and the application
128128
docker-compose up
129+
130+
# Install embedding model (required)
131+
docker exec -it ollama ollama pull nomic-embed-text
132+
133+
# Install a chat model (see above for alternatives)
134+
docker exec -it ollama ollama pull qwen3:14b
129135
```
130136

131137
Access at `http://localhost:8501`

docker-compose.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ services:
99
- "8501:8501"
1010
environment:
1111
# Configure Ollama connection (both env vars for compatibility)
12-
- OLLAMA_HOST=http://host.docker.internal:11434
13-
- OLLAMA_BASE_URL=http://host.docker.internal:11434
12+
- OLLAMA_HOST=ollama:11434
13+
- OLLAMA_BASE_URL=http://ollama:11434
1414
restart: unless-stopped
1515
volumes:
1616
- ./data:/app/data # For persistent data storage
17-
extra_hosts:
18-
- "host.docker.internal:host-gateway"
17+
18+
ollama:
19+
image: docker.io/ollama/ollama:latest
20+
container_name: ollama
21+
pull_policy: always
22+
tty: true
23+
restart: always
24+
environment:
25+
- OLLAMA_KEEP_ALIVE=24h
26+
- OLLAMA_HOST=0.0.0.0
27+
- OLLAMA_PORT=11434

0 commit comments

Comments
 (0)