Skip to content

Commit dd68240

Browse files
jjohareruvnet
andcommitted
chore(compose): add cloudflared on shared visionclaw_network (+ in-progress working tree)
Primary: docker-compose.cloudflared.yml runs a standalone Cloudflare tunnel on the shared external visionclaw_network, reaching the VisionClaw container by its network alias (visionclaw-server:3001). Completes the ecosystem-wide alignment onto visionclaw_network (unified compose + agentbox already on it). Also sweeps in unrelated in-progress working-tree changes per explicit request: Dockerfile.unified, config.yml, agentbox submodule pointer bump (-> origin/live-system @ 1569d26), docs (PRD-021/ADR-126), and eval artifacts. Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent 2ba80dc commit dd68240

22 files changed

Lines changed: 1915 additions & 11 deletions

.venv/bin/python

Lines changed: 0 additions & 1 deletion
This file was deleted.

.venv/bin/python3

Lines changed: 0 additions & 1 deletion
This file was deleted.

.venv/bin/python3.12

Lines changed: 0 additions & 1 deletion
This file was deleted.

.venv/lib64

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile.unified

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,22 @@ ENV RUST_LOG=${RUST_LOG:-warn} \
4545
LD_LIBRARY_PATH="/opt/cuda/lib64:${LD_LIBRARY_PATH}" \
4646
PATH="/root/.cargo/bin:/opt/cuda/bin:${PATH}"
4747

48+
# CachyOS mirror fix (added 2026-06-19): cdn77.cachyos.org has a package sync gap
49+
# and 404s on gcc14/gcc14-libs (confirmed against cachyos-v3:latest). Drop it so
50+
# pacman uses a healthy mirror from the list.
51+
RUN for f in /etc/pacman.d/cachyos-mirrorlist /etc/pacman.d/cachyos-v3-mirrorlist /etc/pacman.d/cachyos-v4-mirrorlist; do [ -f "$f" ] && sed -i '/cdn77/d' "$f"; done; true
52+
4853
# Initialize pacman keyring (required for CachyOS signature verification)
4954
RUN pacman-key --init && \
5055
pacman-key --populate archlinux cachyos && \
5156
pacman -Sy --noconfirm archlinux-keyring cachyos-keyring && \
5257
pacman -Syu --noconfirm && \
5358
rm -rf /var/cache/pacman/pkg/*
5459

60+
# Re-strip cdn77 AFTER `pacman -Syu` (which reinstalls cachyos-mirrorlist and restores
61+
# cdn77), so the package install below uses a healthy mirror deterministically.
62+
RUN for f in /etc/pacman.d/cachyos-mirrorlist /etc/pacman.d/cachyos-v3-mirrorlist /etc/pacman.d/cachyos-v4-mirrorlist; do [ -f "$f" ] && sed -i '/cdn77/d' "$f"; done; true
63+
5564
# Install base system dependencies (with retry logic for transient failures)
5665
RUN for attempt in 1 2 3; do \
5766
echo "=== Package install attempt $attempt/3 ===" && \
@@ -141,11 +150,15 @@ FROM base AS rust-deps
141150
COPY Cargo.toml build.rs ./
142151
COPY Cargo.lock* ./
143152
COPY crates ./crates
153+
# visionclaw-ontology embeds docs/data-sprint/context-v1.jsonld via include_str! at
154+
# compile time, so the dep-build stage needs it present (the dev stage's COPY docs
155+
# happens later, after this cargo build).
156+
COPY docs/data-sprint ./docs/data-sprint
144157

145158
# solid-pod-rs is a crates.io dep — fetched by cargo during build, no COPY needed.
146-
147-
# Copy CUDA source files needed by build.rs for PTX compilation
148-
COPY src/utils/*.cu src/utils/
159+
# CUDA .cu sources moved into crates/visionclaw-gpu/src/cuda_sources/ (copied via
160+
# `COPY crates ./crates` above); the gpu crate's build.rs compiles them to PTX.
161+
# The old `COPY src/utils/*.cu src/utils/` was removed — that path no longer exists.
149162

150163
# Create dummy Rust source to build dependencies without real code
151164
# Must create placeholders for all [[bin]] targets in Cargo.toml
@@ -155,6 +168,7 @@ RUN mkdir -p src/bin examples && \
155168
echo "fn main() {}" > src/bin/generate_types.rs && \
156169
echo "fn main() {}" > src/bin/sync_local.rs && \
157170
echo "fn main() {}" > src/bin/sync_github.rs && \
171+
echo "fn main() {}" > src/bin/validate_md.rs && \
158172
echo "fn main() {}" > examples/constraint_integration_debug.rs && \
159173
echo "fn main() {}" > examples/metadata_debug.rs && \
160174
echo "fn main() {}" > examples/ontology_constraints_example.rs && \
@@ -321,13 +335,19 @@ ENTRYPOINT ["./dev-entrypoint.sh"]
321335
# To update: docker manifest inspect cachyos/cachyos-v3:<tag> and repin the index digest.
322336
FROM cachyos/cachyos-v3@sha256:cacb78623e2b3fc41df6cdeafca92bc92a1a963bd545ce3c01dacfbd73d5c73c AS production
323337

338+
# CachyOS mirror fix (added 2026-06-19): drop cdn77 (gcc14 sync gap / 404s).
339+
RUN for f in /etc/pacman.d/cachyos-mirrorlist /etc/pacman.d/cachyos-v3-mirrorlist /etc/pacman.d/cachyos-v4-mirrorlist; do [ -f "$f" ] && sed -i '/cdn77/d' "$f"; done; true
340+
324341
# Initialize pacman keyring for production stage
325342
RUN pacman-key --init && \
326343
pacman-key --populate archlinux cachyos && \
327344
pacman -Sy --noconfirm archlinux-keyring cachyos-keyring && \
328345
pacman -Syu --noconfirm && \
329346
rm -rf /var/cache/pacman/pkg/*
330347

348+
# Re-strip cdn77 after `pacman -Syu` restores it (see base stage note).
349+
RUN for f in /etc/pacman.d/cachyos-mirrorlist /etc/pacman.d/cachyos-v3-mirrorlist /etc/pacman.d/cachyos-v4-mirrorlist; do [ -f "$f" ] && sed -i '/cdn77/d' "$f"; done; true
350+
331351
# Install only runtime dependencies (no base-devel, no cuda dev headers)
332352
RUN for attempt in 1 2 3; do \
333353
echo "=== Runtime packages install attempt $attempt/3 ===" && \

config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tunnel: logseqXR
22

33
ingress:
4-
- hostname: www.visionclaw.info
4+
- hostname: www.visionclaw.io
55
service: http://visionclaw-server:3001
66
originRequest:
77
noTLSVerify: true
@@ -11,7 +11,7 @@ ingress:
1111
idleTimeout: 10m
1212
websocketIdleTimeout: 10m
1313
keepAliveConnections: 100
14-
httpHostHeader: www.visionclaw.info
14+
httpHostHeader: www.visionclaw.io
1515
proxyProtocol: false
1616
config:
1717
webSockets: true

docker-compose.cloudflared.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Standalone Cloudflare tunnel for the visionflow-hp instance (visionclaw.io).
2+
#
3+
# Token-based tunnel: the ingress mapping (visionclaw.io -> http://visionclaw-server:3001)
4+
# is configured as a "Public Hostname" in the Cloudflare Zero Trust dashboard, so no
5+
# local config.yml is needed here. The cloudflared container joins visionclaw_network
6+
# and reaches the VisionClaw dev/prod container by its network alias `visionclaw-server`
7+
# on nginx port 3001.
8+
#
9+
# Usage:
10+
# 1) put your tunnel token in .env: CLOUDFLARE_TUNNEL_TOKEN=eyJ...
11+
# 2) docker compose -f docker-compose.cloudflared.yml up -d
12+
# 3) docker compose -f docker-compose.cloudflared.yml logs -f # expect "Registered tunnel connection"
13+
services:
14+
cloudflared:
15+
image: cloudflare/cloudflared:latest
16+
container_name: cloudflared-visionclaw-io
17+
restart: unless-stopped
18+
command: tunnel --no-autoupdate run
19+
environment:
20+
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN:?set CLOUDFLARE_TUNNEL_TOKEN in .env first}
21+
networks:
22+
- visionclaw_network
23+
logging:
24+
driver: "json-file"
25+
options:
26+
max-size: "10m"
27+
max-file: "3"
28+
29+
networks:
30+
visionclaw_network:
31+
external: true
32+
name: visionclaw_network

0 commit comments

Comments
 (0)