add Dockerfile and docker-compose.yml

This commit is contained in:
2026-05-23 09:47:38 +08:00
parent a02925dfd0
commit 1850c58197
3 changed files with 32 additions and 0 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]