- 从服务器拉取完整代码 - 按框架规范整理项目结构 - 配置 Drone CI 测试环境部署 - 包含后端(FastAPI)、前端(Vue3)、管理端 技术栈: Vue3 + TypeScript + FastAPI + MySQL
15 lines
429 B
Docker
15 lines
429 B
Docker
# 共享前端 Dockerfile - 使用预构建的 dist 目录
|
|
FROM nginx:1.25-alpine
|
|
|
|
# 复制 nginx 配置
|
|
COPY nginx-shared.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# dist 目录通过 volume 挂载,不在构建时复制
|
|
|
|
# 健康检查
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|