feat: pre-built dist, nginx-only Dockerfile (no server-side build)

This commit is contained in:
Superuser
2026-05-18 23:48:48 +08:00
parent 6ac1d24d21
commit 9adfe90b4c
13 changed files with 67 additions and 10 deletions
+1 -8
View File
@@ -1,12 +1,5 @@
FROM node:24-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm config set registry https://registry.npmmirror.com && npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY dist/ /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]