birdcage-docs/Dockerfile
Ryan Malloy 9c9b69c733 Add deployment infrastructure and TUI showcase guide
Dockerfile (multi-stage: base/dev/build/prod with caddy:2-alpine),
docker-compose.yml with caddy-docker-proxy labels for birdcage.warehack.ing,
Caddyfile, Makefile (up/down/dev/prod/clean), and .env.

TUI guide page with 4 screenshots (F1 position, F2 signal, F4 system,
F5 console), demo mode docs, and project backstory crediting Gabe Emerson
(KL1FI) and Chris Davidson.
2026-02-13 15:12:54 -07:00

26 lines
1.0 KiB
Docker

# ── base: shared dependency install ──────────────────────────────
FROM node:20-slim AS base
WORKDIR /app
ENV ASTRO_TELEMETRY_DISABLED=1
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# ── dev: Astro dev server with HMR ─────────────────────────────
FROM base AS dev
ENV HOST=0.0.0.0
EXPOSE 4321
CMD ["npx", "astro", "dev", "--host", "0.0.0.0", "--port", "4321"]
# ── build: static site generation ───────────────────────────────
FROM base AS build
RUN npx astro build
# ── prod: Caddy serving static files ───────────────────────────
FROM caddy:2-alpine AS prod
COPY Caddyfile /etc/caddy/Caddyfile
COPY --from=build /app/dist /srv
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO- http://127.0.0.1:80/health || exit 1