site/Dockerfile
overasyco d944716309
All checks were successful
Deploy SvelteKit / deploy (push) Successful in 1m30s
use npm i istead of ci
2025-07-23 18:21:01 +00:00

28 lines
484 B
Docker

# Builder stage
FROM node:22-alpine AS builder
WORKDIR /app
# Install deps for build
COPY package*.json .
RUN npm i
# Copy source and build
COPY . .
RUN npm run build
# Final image
FROM node:22-alpine
WORKDIR /app
# Copy only what's needed for runtime
COPY package.json ./
COPY --from=builder /app/build ./build/
COPY --from=builder /app/node_modules ./node_modules/
# Prune dev dependencies
RUN npm prune --production
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", "build"]