Dockerized
This commit is contained in:
parent
1a3ca05cbb
commit
26aee34163
18
Dockerfile
Normal file
18
Dockerfile
Normal 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"]
|
||||
Loading…
x
Reference in New Issue
Block a user