-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (65 loc) · 1.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (65 loc) · 1.84 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
# Sovereign-OS: TUI or Web UI + Redis + persistent data
# Usage:
# TUI: docker compose up -d redis && docker compose run --rm -it app
# Web UI: docker compose up -d redis web
services:
app:
build: .
image: sovereign-os:latest
stdin_open: true
tty: true
environment:
- SOVEREIGN_DATA_DIR=/app/data
- SOVEREIGN_LEDGER_PATH=/app/data/ledger.jsonl
- SOVEREIGN_JOB_DB=/app/data/jobs.db
- REDIS_URL=redis://redis:6379/0
- SOVEREIGN_HEALTH_PORT=8080
- SOVEREIGN_PROMETHEUS_PORT=9464
volumes:
- sovereign_data:/app/data
ports:
- "9464:9464"
- "8080:8080"
depends_on:
redis:
condition: service_healthy
command: ["python", "-m", "sovereign_os.ui.app"]
web:
build: .
image: sovereign-os:latest
environment:
- SOVEREIGN_DATA_DIR=/app/data
- SOVEREIGN_LEDGER_PATH=/app/data/ledger.jsonl
- SOVEREIGN_JOB_DB=/app/data/jobs.db
- REDIS_URL=redis://redis:6379/0
volumes:
- sovereign_data:/app/data
# Mount source so code changes apply without rebuild (use same path as in Dockerfile context)
- ./sovereign_os:/app/sovereign_os:ro
ports:
- "8000:8000"
depends_on:
redis:
condition: service_healthy
command: ["python", "-m", "sovereign_os.web.app", "8000"]
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/status', timeout=5)\" || exit 1"]
interval: 30s
timeout: 10s
retries: 2
start_period: 15s
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
volumes:
sovereign_data:
# ChromaDB and ledger persistence
redis_data: