thread-master/deploy/Dockerfile.web

15 lines
444 B
Docker
Raw Permalink Normal View History

2026-06-28 10:08:43 +00:00
# 前端vite build 出靜態檔,交給 nginx serve並把 /api 反代到 gateway 容器。
# build context = repo root見 deploy/docker-compose.yml
FROM node:22-alpine AS build
WORKDIR /app
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM nginx:alpine
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80