mcwaddams-site/Dockerfile
Ryan Malloy 3af91e8a9d Add Docker deployment for mcwaddams.mcp.website
Multi-stage build: Node 22 for Astro build, Caddy 2 Alpine for
static file serving. Reverse-proxied via caddy-docker-proxy.
2026-02-14 12:57:51 -07:00

22 lines
440 B
Docker

# Stage 1: Build the Astro/Starlight site
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Serve static files with Caddy
FROM caddy:2-alpine
COPY --from=build /app/dist /srv
COPY Caddyfile /etc/caddy/Caddyfile
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO- http://127.0.0.1:8080/health || exit 1