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.
This commit is contained in:
parent
e537ddcda6
commit
3af91e8a9d
6 changed files with 101 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue