-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
142 lines (136 loc) · 4.19 KB
/
Copy pathdocker-compose.yml
File metadata and controls
142 lines (136 loc) · 4.19 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: "3.8"
services:
backend:
build:
context: .
dockerfile: Dockerfile
container_name: cli-ai-backend
ports:
- "8000:8000"
environment:
# Connect to host's Ollama (Windows/Mac: host.docker.internal)
- OLLAMA_HOST=http://host.docker.internal:11434
- QWEN_BASE_URL=http://host.docker.internal:11434/v1
- DEEPSEEK_BASE_URL=http://host.docker.internal:11434/v1
- HEARTBEAT_INTERVAL=300
volumes:
# Persistent volumes for memory and data
- cli-ai-memory:/app/skills/conscience/memory/store
- cli-ai-data:/app/data
- cli-ai-workflows:/app/data/workflows
# Mount configs for hot-reload
- ./configs:/app/configs:ro
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/status')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
extra_hosts:
# Allow container to reach host network (for Ollama)
- "host.docker.internal:host-gateway"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: cli-ai-frontend
ports:
- "5173:80"
depends_on:
backend:
condition: service_healthy
restart: always
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
# Worker container for background task execution
worker:
build:
context: .
dockerfile: Dockerfile
container_name: cli-ai-worker
command: ["python", "run.py", "--verbose"]
environment:
- OLLAMA_HOST=http://host.docker.internal:11434
- QWEN_BASE_URL=http://host.docker.internal:11434/v1
- DEEPSEEK_BASE_URL=http://host.docker.internal:11434/v1
- HEARTBEAT_INTERVAL=300
volumes:
# Share memory and data with backend
- cli-ai-memory:/app/skills/conscience/memory/store
- cli-ai-data:/app/data
- cli-ai-workflows:/app/data/workflows
- ./configs:/app/configs:ro
restart: always
depends_on:
backend:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
# CI/CD Runner - Autonomous pipeline executor with multi-model intelligence
# Uses: CodeGemma (quick), Qwen3 (creative), DeepSeek (reasoning)
cicd:
build:
context: .
dockerfile: Dockerfile.cicd
container_name: cli-ai-cicd
environment:
# LLM endpoints for multi-model routing
- OLLAMA_HOST=http://host.docker.internal:11434
- QWEN_BASE_URL=http://host.docker.internal:11434/v1
- DEEPSEEK_BASE_URL=http://host.docker.internal:11434/v1
# CI/CD configuration
- CICD_POLL_INTERVAL=60
- CICD_AUTO_IMPROVE=true #set false if not self-improvement allowed
- PIPELINE_DATA_DIR=/app/data/pipeline_runs
- ARTIFACTS_DIR=/app/data/artifacts
volumes:
# Shared data with other containers
- cli-ai-memory:/app/skills/conscience/memory/store
- cli-ai-data:/app/data
- cli-ai-workflows:/app/data/workflows
- cli-ai-pipelines:/app/data/pipeline_runs
- cli-ai-artifacts:/app/data/artifacts
# Workspace for builds
- cli-ai-workspace:/workspace
# Docker socket for container operations
- /var/run/docker.sock:/var/run/docker.sock
# Source code for analysis (read-only)
- ./skills:/app/skills:ro
- ./configs:/app/configs:ro
restart: always
depends_on:
backend:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
# Run with access to docker group
group_add:
- "999" # Docker group (may vary by system)
# Named volumes for persistence across container restarts
volumes:
cli-ai-memory:
name: cli-ai-memory
driver: local
cli-ai-data:
name: cli-ai-data
driver: local
cli-ai-workflows:
name: cli-ai-workflows
driver: local
cli-ai-pipelines:
name: cli-ai-pipelines
driver: local
cli-ai-artifacts:
name: cli-ai-artifacts
driver: local
cli-ai-workspace:
name: cli-ai-workspace
driver: local
networks:
default:
name: cli-ai-network