feat: add dockerfile
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
# build
|
||||
FROM node:24-alpine AS builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache python3 make g++ gcc
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# prod
|
||||
FROM node:24-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache python3 make g++
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production # only prod deps
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user