chore: productionize compose deployment

This commit is contained in:
Cheng Zhou
2026-03-27 16:13:28 +08:00
parent d8c5413b26
commit f2f856ea24
7 changed files with 182 additions and 79 deletions
+12 -4
View File
@@ -1,7 +1,15 @@
FROM node:20-alpine
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ci
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host", "--port", "5173"]
RUN npm run build
FROM alpine:3.21
WORKDIR /opt/frontend
COPY --from=build /app/dist ./dist