Multi-stage Dockerfile (node build -> nginx serve), nginx config with _astro asset caching, .dockerignore, and .gitignore hardening for TLS key files. Astro already builds static output with site set to https://larpaso.de. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JmTVcwbGJBYP7gu4P7b1yG
13 lines
272 B
Docker
13 lines
272 B
Docker
# --- Build-Stage ---
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# --- Serve-Stage ---
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|