Files
ThinkFlowAI/Dockerfile
史悦 8eb5499ecc feat(docker): 重构Docker配置以支持生产环境部署
- 添加Dockerfile.dev用于开发环境
- 重构主Dockerfile使用多阶段构建
- 添加nginx配置和entrypoint脚本
- 更新docker-compose.yml配置
- 修改API基础路径为相对路径
- 更新vite配置支持环境变量
2026-01-22 16:28:55 +08:00

26 lines
398 B
Docker

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf.template /etc/nginx/templates/nginx.conf.template
COPY entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 80
CMD ["/docker-entrypoint.sh"]