Files
012-kaopeilian/frontend/Dockerfile.dev
111 998211c483 feat: 初始化考培练系统项目
- 从服务器拉取完整代码
- 按框架规范整理项目结构
- 配置 Drone CI 测试环境部署
- 包含后端(FastAPI)、前端(Vue3)、管理端

技术栈: Vue3 + TypeScript + FastAPI + MySQL
2026-01-24 19:33:28 +08:00

30 lines
583 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 开发环境 Dockerfile
FROM node:18-alpine
# 设置工作目录
WORKDIR /app
# 安装curl用于健康检查
RUN apk add --no-cache curl
# 配置npm使用阿里云镜像
RUN npm config set registry https://registry.npmmirror.com
# 安装依赖
COPY package*.json ./
RUN npm install
# 复制源代码volume会覆盖
COPY . .
# 暴露端口
EXPOSE 3001
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3001 || exit 1
# 启动开发服务器
CMD ["npm", "run", "dev"]