This repository was archived by the owner on Feb 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.31 KB
/
docker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.31 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:
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
environment:
- OLLAMA_DEBUG=0
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "ollama list > /dev/null 2>&1 || exit 1" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
ollama-setup:
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
volumes:
- ollama_data:/root/.ollama
environment:
- OLLAMA_HOST=http://ollama:11434
- OLLAMA_DEBUG=0
entrypoint: >
sh -c "
until ollama list > /dev/null 2>&1; do sleep 5; done &&
ollama pull llama3.2:3b &&
echo 'Hello' | ollama run llama3.2:3b
"
restart: "no"
demo:
build: .
ports:
- "8080:8080"
depends_on:
ollama-setup:
condition: service_completed_successfully
environment:
- SPRING_PROFILES_ACTIVE=docker
- OLLAMA_BASE_URL=http://ollama:11434
- OLLAMA_MODEL_NAME=llama3.2:3b
- SPEECH_ENABLED=true
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
ollama_data: