1+ version : ' 3.8'
2+
3+ services :
4+ terraphim :
5+ image : ghcr.io/terraphim/terraphim-server:v0.2.3
6+ container_name : terraphim-server
7+ restart : unless-stopped
8+ ports :
9+ - " 8000:8000"
10+ volumes :
11+ - ./config:/home/terraphim/.config/terraphim
12+ - ./data:/home/terraphim/data
13+ - ./logs:/home/terraphim/logs
14+ environment :
15+ - RUST_LOG=info
16+ - LOG_LEVEL=info
17+ - TERRAPHIM_SERVER_HOSTNAME=0.0.0.0:8000
18+ - TERRAPHIM_SERVER_API_ENDPOINT=http://localhost:8000/api
19+ - RUST_BACKTRACE=1
20+ healthcheck :
21+ test : ["CMD", "curl", "-f", "http://localhost:8000/health"]
22+ interval : 30s
23+ timeout : 10s
24+ retries : 3
25+ start_period : 40s
26+ networks :
27+ - terraphim-network
28+
29+ # Optional: Ollama for local AI inference
30+ ollama :
31+ image : ollama/ollama:latest
32+ container_name : terraphim-ollama
33+ restart : unless-stopped
34+ ports :
35+ - " 11434:11434"
36+ volumes :
37+ - ./ollama:/root/.ollama
38+ environment :
39+ - OLLAMA_HOST=0.0.0.0
40+ networks :
41+ - terraphim-network
42+ profiles :
43+ - ai
44+
45+ # Optional: Redis for caching
46+ redis :
47+ image : redis:7-alpine
48+ container_name : terraphim-redis
49+ restart : unless-stopped
50+ ports :
51+ - " 6379:6379"
52+ volumes :
53+ - redis-data:/data
54+ command : redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
55+ networks :
56+ - terraphim-network
57+ profiles :
58+ - cache
59+
60+ # Optional: Nginx reverse proxy
61+ nginx :
62+ image : nginx:alpine
63+ container_name : terraphim-nginx
64+ restart : unless-stopped
65+ ports :
66+ - " 80:80"
67+ - " 443:443"
68+ volumes :
69+ - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
70+ - ./nginx/ssl:/etc/nginx/ssl:ro
71+ - ./logs/nginx:/var/log/nginx
72+ depends_on :
73+ - terraphim
74+ networks :
75+ - terraphim-network
76+ profiles :
77+ - proxy
78+
79+ volumes :
80+ redis-data :
81+ driver : local
82+
83+ networks :
84+ terraphim-network :
85+ driver : bridge
86+ ipam :
87+ config :
88+ - subnet : 172.20.0.0/16
0 commit comments