feat: Add support for docker deploy

This commit is contained in:
wengchaoxi
2024-03-29 15:30:57 +08:00
parent c30a11744d
commit 5f8fdf9117
4 changed files with 71 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1
FROM node:lts-alpine AS builder
WORKDIR /src
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:lts-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --only=production
COPY --from=builder /src/.next ./.next
EXPOSE 3000
CMD ["npm", "run", "start"]