docs(reference): import Dune: Awakening server-manager references
All checks were successful
CI / backend-types (push) Successful in 10s
CI / frontend-build (push) Successful in 15s
CI / agent-tests (push) Successful in 39s
CI / integration (push) Successful in 22s

Phase 2 references for the host-agent Dune adapter, moved out of volatile /tmp
into docs/reference-repos/ (per Commander). Three upstream projects, .git +
node_modules + compiled binaries stripped (16MB source). Nested AI-instruction
files (.claude/, CLAUDE.md) removed so they don't pollute Corrosion sessions.

- icehunter/    dune-admin (Go+React) — 4 control planes; SETUP_DOCKER.md is the
                closest analog to our agent's Dune docker control plane (compose
                lifecycle, docker logs, RabbitMQ-via-exec, dune Postgres schema)
- adainrivers/  Rust/Tauri desktop — SSH+k8s BattleGroup control, maintenance
                daemon, in-game admin console (Rust idiom reference)
- the4rchangel/ Node web UI replacing battlegroup.bat — matches the Commander's
                Hyper-V self-host path + game-config schema

See docs/reference-repos/README.md for the full index + how we use each.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-06-11 21:08:05 -04:00
parent 0715492ddf
commit 651a35d4be
1334 changed files with 238971 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
# ── Frontend build ────────────────────────────────────────────────────────────
FROM --platform=$BUILDPLATFORM node:22-slim AS web-builder
WORKDIR /build/web
# Install pnpm via corepack (matches packageManager field in package.json)
RUN corepack enable && corepack prepare pnpm@10.28.1 --activate
COPY web/package.json web/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY web/ ./
# No VITE_CDN_BASE_URL → isCdnDeploy=false → SPA uses same-origin API base.
# VITE_MARKET_BOT_ENABLED=true shows the Bot Control button in the UI.
RUN VITE_MARKET_BOT_ENABLED=true pnpm build
# ── Go build ──────────────────────────────────────────────────────────────────
FROM --platform=$BUILDPLATFORM golang:1.26.4 AS go-builder
WORKDIR /build
ARG TARGETOS
ARG TARGETARCH
ARG APP_VERSION=dev
ARG GIT_COMMIT=unknown
ARG BUILD_TIME=unknown
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} \
go build \
-ldflags="-s -w -X main.AppVersion=${APP_VERSION} -X main.GitCommit=${GIT_COMMIT} -X main.BuildTime=${BUILD_TIME}" \
-o dune-admin ./cmd/dune-admin
# ── Runtime ───────────────────────────────────────────────────────────────────
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates kubernetes-client postgresql-client && rm -rf /var/lib/apt/lists/*
# Expose build time so the seed-binary init container can stamp the PVC.
# BUILD_TIME is set to $(date -u) by deploy.sh on every run, so every deploy
# triggers a re-seed regardless of whether version or commit changed.
ARG BUILD_TIME=unknown
ENV IMAGE_BUILD_TIME=${BUILD_TIME}
WORKDIR /app
COPY --from=go-builder /build/dune-admin .
COPY --from=go-builder \
/build/tags-data.json \
/build/item-data.json \
/build/quality-data.json \
/build/gameplayTags.json \
/build/skillModules.json \
/build/vehicles.json \
/build/cheatScripts.json \
./
COPY --from=web-builder /build/web/dist ./dist
# Seed directory for the K8s host-mount pattern. Lives outside /app so that a
# PVC mounted at /app doesn't hide it. The init container re-seeds when the
# image version differs from the stamp in the PVC, so new image deploys always
# update the binary while pod restarts after a self-update keep the newer binary.
RUN mkdir -p /usr/local/share/dune-admin-seed && \
cp dune-admin \
tags-data.json item-data.json quality-data.json \
gameplayTags.json skillModules.json vehicles.json cheatScripts.json \
/usr/local/share/dune-admin-seed/ && \
cp -r dist /usr/local/share/dune-admin-seed/dist
EXPOSE 8080
ENTRYPOINT ["./dune-admin"]