Astro 5 + Starlight 0.37 docs site for the NanoVNA-F V3 portable vector network analyzer. Content sourced from the extracted PDF user guide and menu structure map. - 38 MDX content pages organized in diataxis structure (getting-started, tutorials, how-to guides, reference) - Steel blue/teal theme (#2d7d9a/#5bb8d4) distinct from NanoVNA-H - 5 custom Astro components (CommandTable, MenuTree, SpecCard, ScreenRegion, CalibrationStep) - 42 renamed screenshots from the user guide PDF extraction - Docker deployment via Caddy behind caddy-docker-proxy - Full console command reference (28 commands) - Complete menu map with interactive tree component
48 lines
1.1 KiB
Docker
48 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# Build stage - using Node.js with pnpm
|
|
FROM node:22-alpine AS builder
|
|
|
|
# Install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
# Install dependencies with cache mount
|
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
|
|
pnpm install --frozen-lockfile
|
|
|
|
# Copy source files
|
|
COPY . .
|
|
|
|
# Disable telemetry and build
|
|
ENV ASTRO_TELEMETRY_DISABLED=1
|
|
RUN pnpm build
|
|
|
|
# Production stage - lightweight static server
|
|
FROM caddy:2-alpine AS production
|
|
|
|
# Copy built static files
|
|
COPY --from=builder /app/dist /srv
|
|
|
|
# Simple Caddyfile for static file serving
|
|
# Note: caddy-docker-proxy handles the external routing
|
|
COPY <<EOF /etc/caddy/Caddyfile
|
|
:80 {
|
|
root * /srv
|
|
file_server
|
|
encode gzip
|
|
try_files {path} {path}/ /index.html
|
|
header Cache-Control "public, max-age=3600"
|
|
@immutable path /_astro/*
|
|
header @immutable Cache-Control "public, max-age=31536000, immutable"
|
|
}
|
|
EOF
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
|