-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (77 loc) · 3.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (77 loc) · 3.01 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: "3.9"
# ─── CrustAI — One-click local AI stack ───────────────────────────────────────
#
# Usage:
# 1. cp config/config.example.yml config/config.yml
# 2. Edit config/config.yml with your bot tokens
# 3. docker compose up -d
#
# The stack starts:
# • ollama — local LLM engine (port 11434)
# • crustai — AI assistant bot (port 3000)
# ──────────────────────────────────────────────────────────────────────────────
services:
# ── Ollama ──────────────────────────────────────────────────────────────────
ollama:
image: ollama/ollama:latest
container_name: crustai-ollama
restart: unless-stopped
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
# ── Model puller (runs once, then exits) ────────────────────────────────────
ollama-pull:
image: ollama/ollama:latest
container_name: crustai-ollama-pull
depends_on:
ollama:
condition: service_healthy
environment:
- OLLAMA_HOST=http://ollama:11434
entrypoint: >
sh -c "
ollama pull ${OLLAMA_MODEL:-tinyllama} &&
echo '✅ Model ${OLLAMA_MODEL:-tinyllama} ready'
"
restart: "no"
# ── CrustAI ─────────────────────────────────────────────────────────────────
crustai:
build:
context: .
dockerfile: Dockerfile
container_name: crustai-app
restart: unless-stopped
depends_on:
ollama:
condition: service_healthy
ports:
- "3000:3000"
volumes:
# Config (required — must exist before running)
- ./config/config.yml:/app/config/config.yml:ro
- ./config/personality.yml:/app/config/personality.yml:ro
# Persistent local database
- crustai_data:/app/data
environment:
- NODE_ENV=production
- OLLAMA_URL=http://ollama:11434
- OLLAMA_MODEL=${OLLAMA_MODEL:-tinyllama}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# ─── Volumes ──────────────────────────────────────────────────────────────────
volumes:
ollama_data:
driver: local
crustai_data:
driver: local