@arkhera30/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose/docker-compose.yml +238 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1796 -0
- package/package.json +55 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
# Horus — Production Docker Compose
|
|
3
|
+
# Managed by @horus/cli. Do not edit manually.
|
|
4
|
+
#
|
|
5
|
+
# This file uses pre-built images from ghcr.io. Once CI pipelines are set up,
|
|
6
|
+
# images will be published on every release. Until then, these are placeholder
|
|
7
|
+
# references that will be updated when the registry is ready.
|
|
8
|
+
#
|
|
9
|
+
# Usage (managed by CLI):
|
|
10
|
+
# horus setup — first-time configuration + start
|
|
11
|
+
# horus up — start the stack
|
|
12
|
+
# horus down — stop the stack (preserves data)
|
|
13
|
+
# horus status — show service health
|
|
14
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
15
|
+
|
|
16
|
+
services:
|
|
17
|
+
|
|
18
|
+
# ── QMD Daemon ─────────────────────────────────────────────────────────────
|
|
19
|
+
# Shared QMD MCP HTTP server. Keeps GGUF models warm in memory so Anvil and
|
|
20
|
+
# Vault pay the model-load cost only once.
|
|
21
|
+
#
|
|
22
|
+
# The qmd-daemon-data volume is also mounted into the Anvil and Vault
|
|
23
|
+
# containers at their respective ~/.cache/qmd paths. This lets both services
|
|
24
|
+
# run `qmd collection add` / `qmd update` subprocess calls that write to the
|
|
25
|
+
# same SQLite database the daemon reads from — keeping the index current.
|
|
26
|
+
#
|
|
27
|
+
# start_period covers first-boot GGUF model download (~1-2 GB) + initial embed.
|
|
28
|
+
qmd-daemon:
|
|
29
|
+
image: ghcr.io/arkhera/horus/qmd-daemon:latest
|
|
30
|
+
environment:
|
|
31
|
+
- QMD_DAEMON_PORT=8181
|
|
32
|
+
volumes:
|
|
33
|
+
- qmd-daemon-data:/home/qmd/.cache/qmd
|
|
34
|
+
networks:
|
|
35
|
+
- horus-net
|
|
36
|
+
restart: unless-stopped
|
|
37
|
+
stop_grace_period: 15s
|
|
38
|
+
deploy:
|
|
39
|
+
resources:
|
|
40
|
+
limits:
|
|
41
|
+
memory: 4g
|
|
42
|
+
reservations:
|
|
43
|
+
memory: 512m
|
|
44
|
+
healthcheck:
|
|
45
|
+
test: ["CMD", "curl", "-f", "http://localhost:8181/health"]
|
|
46
|
+
interval: 30s
|
|
47
|
+
timeout: 10s
|
|
48
|
+
start_period: 600s
|
|
49
|
+
retries: 3
|
|
50
|
+
|
|
51
|
+
# ── Anvil ──────────────────────────────────────────────────────────────────
|
|
52
|
+
# Notes system and MCP server. Indexes markdown files from the Notes repo.
|
|
53
|
+
anvil:
|
|
54
|
+
image: ghcr.io/arkhera/horus/anvil:latest
|
|
55
|
+
ports:
|
|
56
|
+
- "${ANVIL_PORT:-8100}:8100"
|
|
57
|
+
volumes:
|
|
58
|
+
# Notes repo — read/write so Anvil can git-sync or clone on first boot
|
|
59
|
+
- ${HORUS_DATA_PATH}/notes:/data/notes:rw
|
|
60
|
+
# Shared QMD database + model cache (same volume as qmd-daemon).
|
|
61
|
+
- qmd-daemon-data:/home/anvil/.cache/qmd
|
|
62
|
+
environment:
|
|
63
|
+
- ANVIL_TRANSPORT=http
|
|
64
|
+
- ANVIL_PORT=8100
|
|
65
|
+
- ANVIL_HOST=0.0.0.0
|
|
66
|
+
- ANVIL_NOTES_PATH=/data/notes
|
|
67
|
+
- ANVIL_REPO_URL=${ANVIL_REPO_URL:-}
|
|
68
|
+
- ANVIL_QMD_COLLECTION=${ANVIL_QMD_COLLECTION:-anvil}
|
|
69
|
+
- ANVIL_SYNC_INTERVAL=${ANVIL_SYNC_INTERVAL:-300}
|
|
70
|
+
- ANVIL_DEBOUNCE_SECONDS=${ANVIL_DEBOUNCE_SECONDS:-5}
|
|
71
|
+
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
|
|
72
|
+
# Route search calls to the shared daemon; fall back to subprocess if unset.
|
|
73
|
+
- QMD_DAEMON_URL=http://qmd-daemon:8181
|
|
74
|
+
depends_on:
|
|
75
|
+
qmd-daemon:
|
|
76
|
+
condition: service_healthy
|
|
77
|
+
networks:
|
|
78
|
+
- horus-net
|
|
79
|
+
restart: unless-stopped
|
|
80
|
+
stop_grace_period: 15s
|
|
81
|
+
deploy:
|
|
82
|
+
resources:
|
|
83
|
+
limits:
|
|
84
|
+
memory: 512m
|
|
85
|
+
reservations:
|
|
86
|
+
memory: 256m
|
|
87
|
+
healthcheck:
|
|
88
|
+
test: ["CMD", "curl", "-f", "http://localhost:8100/health"]
|
|
89
|
+
interval: 30s
|
|
90
|
+
timeout: 5s
|
|
91
|
+
start_period: 600s
|
|
92
|
+
retries: 3
|
|
93
|
+
|
|
94
|
+
# ── Vault ──────────────────────────────────────────────────────────────────
|
|
95
|
+
# Knowledge service. Semantic search over the knowledge-base repo.
|
|
96
|
+
vault:
|
|
97
|
+
image: ghcr.io/arkhera/horus/vault:latest
|
|
98
|
+
ports:
|
|
99
|
+
- "${VAULT_PORT:-8000}:8000"
|
|
100
|
+
volumes:
|
|
101
|
+
# Knowledge-base repo — read/write; Vault clones on first boot if empty
|
|
102
|
+
- ${HORUS_DATA_PATH}/knowledge-base:/data/knowledge-repo:rw
|
|
103
|
+
# Write-path workspace: staging area for draft pages before PR
|
|
104
|
+
- vault-workspace:/data/workspace
|
|
105
|
+
# Shared QMD database + model cache (same volume as qmd-daemon).
|
|
106
|
+
- qmd-daemon-data:/home/appuser/.cache/qmd
|
|
107
|
+
environment:
|
|
108
|
+
- KNOWLEDGE_REPO_PATH=/data/knowledge-repo
|
|
109
|
+
- WORKSPACE_PATH=/data/workspace
|
|
110
|
+
- VAULT_KNOWLEDGE_REPO_URL=${VAULT_KNOWLEDGE_REPO_URL:-}
|
|
111
|
+
- QMD_INDEX_NAME=${QMD_INDEX_NAME:-knowledge}
|
|
112
|
+
- SYNC_INTERVAL=${VAULT_SYNC_INTERVAL:-300}
|
|
113
|
+
- VAULT_SYNC_INTERVAL=${VAULT_SYNC_INTERVAL:-300}
|
|
114
|
+
- LOG_LEVEL=${LOG_LEVEL:-info}
|
|
115
|
+
- HOST=0.0.0.0
|
|
116
|
+
- PORT=8000
|
|
117
|
+
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
|
|
118
|
+
# Route search calls to the shared daemon; fall back to subprocess if unset.
|
|
119
|
+
- QMD_DAEMON_URL=http://qmd-daemon:8181
|
|
120
|
+
depends_on:
|
|
121
|
+
qmd-daemon:
|
|
122
|
+
condition: service_healthy
|
|
123
|
+
networks:
|
|
124
|
+
- horus-net
|
|
125
|
+
restart: unless-stopped
|
|
126
|
+
stop_grace_period: 15s
|
|
127
|
+
deploy:
|
|
128
|
+
resources:
|
|
129
|
+
limits:
|
|
130
|
+
memory: 512m
|
|
131
|
+
reservations:
|
|
132
|
+
memory: 256m
|
|
133
|
+
healthcheck:
|
|
134
|
+
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
135
|
+
interval: 30s
|
|
136
|
+
timeout: 10s
|
|
137
|
+
start_period: 30s
|
|
138
|
+
retries: 3
|
|
139
|
+
|
|
140
|
+
# ── Vault MCP ──────────────────────────────────────────────────────────────
|
|
141
|
+
# Thin MCP adapter that translates MCP tool calls to Vault REST API calls.
|
|
142
|
+
vault-mcp:
|
|
143
|
+
image: ghcr.io/arkhera/horus/vault-mcp:latest
|
|
144
|
+
ports:
|
|
145
|
+
- "${VAULT_MCP_PORT:-8300}:8300"
|
|
146
|
+
environment:
|
|
147
|
+
- VAULT_MCP_HTTP=true
|
|
148
|
+
- VAULT_MCP_PORT=8300
|
|
149
|
+
- VAULT_MCP_HOST=0.0.0.0
|
|
150
|
+
# Points at the internal Docker network address of the vault service
|
|
151
|
+
- KNOWLEDGE_SERVICE_URL=http://vault:8000
|
|
152
|
+
depends_on:
|
|
153
|
+
vault:
|
|
154
|
+
condition: service_healthy
|
|
155
|
+
networks:
|
|
156
|
+
- horus-net
|
|
157
|
+
restart: unless-stopped
|
|
158
|
+
stop_grace_period: 15s
|
|
159
|
+
deploy:
|
|
160
|
+
resources:
|
|
161
|
+
limits:
|
|
162
|
+
memory: 256m
|
|
163
|
+
reservations:
|
|
164
|
+
memory: 64m
|
|
165
|
+
healthcheck:
|
|
166
|
+
test: ["CMD", "curl", "-f", "http://localhost:8300/health"]
|
|
167
|
+
interval: 30s
|
|
168
|
+
timeout: 5s
|
|
169
|
+
start_period: 30s
|
|
170
|
+
retries: 3
|
|
171
|
+
|
|
172
|
+
# ── Forge ──────────────────────────────────────────────────────────────────
|
|
173
|
+
# Workspace manager and package registry MCP server.
|
|
174
|
+
forge:
|
|
175
|
+
image: ghcr.io/arkhera/horus/forge:latest
|
|
176
|
+
ports:
|
|
177
|
+
- "${FORGE_PORT:-8200}:8200"
|
|
178
|
+
volumes:
|
|
179
|
+
# Forge Registry — read/write; Forge clones on first boot if empty
|
|
180
|
+
- ${HORUS_DATA_PATH}/registry:/data/registry:rw
|
|
181
|
+
# Workspaces: Forge creates workspace directories here
|
|
182
|
+
- ${HORUS_DATA_PATH}/workspaces:/data/workspaces:rw
|
|
183
|
+
# Local repos — read-only; lets Forge scan host repos for the index
|
|
184
|
+
- ${HOST_REPOS_PATH}:/data/repos:ro
|
|
185
|
+
environment:
|
|
186
|
+
- FORGE_PORT=8200
|
|
187
|
+
- FORGE_HOST=0.0.0.0
|
|
188
|
+
- FORGE_REGISTRY_PATH=/data/registry
|
|
189
|
+
- FORGE_WORKSPACES_PATH=/data/workspaces
|
|
190
|
+
- FORGE_REGISTRY_REPO_URL=${FORGE_REGISTRY_REPO_URL:-}
|
|
191
|
+
- FORGE_SYNC_INTERVAL=${FORGE_SYNC_INTERVAL:-300}
|
|
192
|
+
# Docker-internal service URLs
|
|
193
|
+
- FORGE_ANVIL_URL=http://anvil:8100
|
|
194
|
+
- FORGE_VAULT_URL=http://vault-mcp:8300
|
|
195
|
+
# Host-facing URLs and paths — used when emitting .claude/settings.local.json
|
|
196
|
+
- FORGE_HOST_WORKSPACES_PATH=${HORUS_DATA_PATH}/workspaces
|
|
197
|
+
- FORGE_HOST_REPOS_PATH=${HOST_REPOS_PATH}
|
|
198
|
+
- FORGE_HOST_ANVIL_URL=http://localhost:${ANVIL_PORT:-8100}
|
|
199
|
+
- FORGE_HOST_VAULT_URL=http://localhost:${VAULT_MCP_PORT:-8300}
|
|
200
|
+
- FORGE_HOST_FORGE_URL=http://localhost:${FORGE_PORT:-8200}
|
|
201
|
+
# Colon-separated list of in-container paths to scan for git repos
|
|
202
|
+
- FORGE_SCAN_PATHS=/data/repos
|
|
203
|
+
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
|
|
204
|
+
depends_on:
|
|
205
|
+
anvil:
|
|
206
|
+
condition: service_healthy
|
|
207
|
+
vault:
|
|
208
|
+
condition: service_healthy
|
|
209
|
+
networks:
|
|
210
|
+
- horus-net
|
|
211
|
+
restart: unless-stopped
|
|
212
|
+
stop_grace_period: 15s
|
|
213
|
+
deploy:
|
|
214
|
+
resources:
|
|
215
|
+
limits:
|
|
216
|
+
memory: 512m
|
|
217
|
+
reservations:
|
|
218
|
+
memory: 128m
|
|
219
|
+
healthcheck:
|
|
220
|
+
test: ["CMD", "curl", "-f", "http://localhost:8200/health"]
|
|
221
|
+
interval: 30s
|
|
222
|
+
timeout: 5s
|
|
223
|
+
start_period: 60s
|
|
224
|
+
retries: 3
|
|
225
|
+
|
|
226
|
+
# ── Networks ──────────────────────────────────────────────────────────────────
|
|
227
|
+
networks:
|
|
228
|
+
horus-net:
|
|
229
|
+
driver: bridge
|
|
230
|
+
|
|
231
|
+
# ── Volumes ───────────────────────────────────────────────────────────────────
|
|
232
|
+
volumes:
|
|
233
|
+
# Shared QMD daemon database + GGUF model cache.
|
|
234
|
+
# Mounted into qmd-daemon, Anvil, and Vault so all three share one SQLite index.
|
|
235
|
+
# Persists model downloads (~1-2 GB) and index across container rebuilds.
|
|
236
|
+
qmd-daemon-data:
|
|
237
|
+
# Vault write-path staging workspace
|
|
238
|
+
vault-workspace:
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|