omni-pca-docs/Dockerfile
Ryan Malloy c5e72c679b Initial scaffold
Astro 6 + Starlight 0.39 documentation site for omni-pca, organised
around the Diatáxis framework (Tutorials / How-to / Reference /
Explanation), plus a chronological Journey page and Changelog.

Theme: muted slate-blue with amber accents. astro-icon + lucide
preinstalled. Astro telemetry and Starlight devToolbar both off.

Deployment: multi-stage Dockerfile (node:25-alpine builder ->
caddy:2-alpine runtime), inner Caddy serves static dist on :80,
outer caddy-docker-proxy on the host terminates TLS for
hai-omni-pro-ii.warehack.ing.
2026-05-10 16:42:12 -06:00

38 lines
792 B
Docker

# syntax=docker/dockerfile:1.7
# ---- builder ----
FROM node:25-alpine AS builder
ENV ASTRO_TELEMETRY_DISABLED=1 \
NODE_ENV=production \
CI=true
WORKDIR /app
# Install deps in their own layer for better caching.
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci --include=dev
# Copy the rest of the source and build.
COPY . .
RUN npm run build
# ---- runtime ----
FROM caddy:2-alpine AS runtime
# Run as non-root.
RUN addgroup -S docs && adduser -S -G docs docs
WORKDIR /srv
COPY --from=builder /app/dist /srv
COPY Caddyfile /etc/caddy/Caddyfile
# caddy:2-alpine ships with a sane default user model; keep ports unprivileged.
EXPOSE 80
USER docs
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]