Dockerized

This commit is contained in:
Greg 2025-05-20 20:55:06 +02:00
parent 1a3ca05cbb
commit 26aee34163

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# Production-ready Dockerfile for Astro
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
RUN npm ci && npm run build
# Production image
FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/public ./public
VOLUME ["/app/public", "/app/src/content"]
EXPOSE 4321
CMD ["npx", "astro", "preview"]