-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
63 lines (58 loc) · 2.35 KB
/
docker-compose.yaml
File metadata and controls
63 lines (58 loc) · 2.35 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'
# ─────────────────────────────────────────────
# preLLM — zero-config deployment
# ─────────────────────────────────────────────
# 1. cp .env.example .env
# 2. Fill in your API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
# 3. docker-compose up -d
services:
# ─────────────────────────────────────────────
# preLLM API Server
# ─────────────────────────────────────────────
prellm:
build: .
image: prellm/prellm:latest
ports:
- "${PRELLM_PORT:-8080}:8080"
env_file:
- .env
environment:
# Override Ollama base to point to the container
- OLLAMA_API_BASE=http://ollama:11434
volumes:
- ./configs:/app/configs:ro
command: ["serve", "--host", "0.0.0.0", "--port", "8080"]
depends_on:
- ollama
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
# ─────────────────────────────────────────────
# Ollama (local small LLM — no API key needed)
# ─────────────────────────────────────────────
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_models:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0
restart: unless-stopped
# ─────────────────────────────────────────────
# Pull default small model on first startup
# ─────────────────────────────────────────────
ollama-pull:
image: ollama/ollama:latest
depends_on:
- ollama
entrypoint: >
sh -c "sleep 5 && ollama pull qwen2.5:3b"
environment:
- OLLAMA_HOST=ollama:11434
restart: "no"
volumes:
ollama_models: