Refactor theming and improve Docker deployment with health checks - #5
Open
oierxjn wants to merge 8 commits into
Open
Refactor theming and improve Docker deployment with health checks#5oierxjn wants to merge 8 commits into
oierxjn wants to merge 8 commits into
Conversation
CardTheme已被弃用,使用CardThemeData替代以保持与Flutter最新版本的兼容性
新增三服务编排(mysql/backend/frontend): - docker-compose.yml: 编排 MySQL 8 + Flask 后端 + Nginx 前端 - backend/Dockerfile: Gunicorn + eventlet worker 支持 WebSocket - frontend/Dockerfile + nginx.conf: 多阶段构建并反向代理 /api /socket.io /uploads - .env.example: 生产环境变量模板 - DEPLOY_DOCKER.md: 部署/运维/备份文档
Docker/Linux 环境构建失败,因为在区分大小写的文件系统上 './components/Sidebar.vue' 无法解析到实际文件 SideBar.vue。 Vite dev server 在 Windows 下因大小写不敏感而未暴露此问题, 生产构建 (vite build) 会直接失败。修正 import 路径与文件名一致。
统一完善两个服务的健康检查配置,通过健康检查更好地管控服务启动依赖顺序,提升容器编排的稳定性
1. add gunicorn to requirements.txt for production server 2. install curl in Dockerfile for container health check 3. add /api/health endpoint to check app and database status
补充忽略仓库根目录下Flutter Windows构建生成的/build/文件夹
1. 将gunicorn版本锁定为23.0.0避免版本波动 2. 修正启动命令中eventlet worker类的完整路径写法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
为 CollabU 新增 Docker Compose 一键部署能力(MySQL + Flask 后端 + Vue3 前端),
并附带后端健康检查接口与若干跨平台/框架兼容性修复。
What's Changed
✨ New Features
docker-compose.yml,编排mysql:8.0/backend(Gunicorn + eventlet)/frontend(Nginx)三容器,内置健康检查、命名卷数据持久化与一键启停。
backend/Dockerfile,生产环境使用gunicorn==23.0.0+ eventlet worker(支持 Socket.IO WebSocket),启动时自动执行
flask db upgrade建表。frontend/Dockerfile(Node 20 多阶段构建)与frontend/nginx.conf(静态托管 +/api、/socket.io、/uploads反向代理)。GET /api/health,验证进程存活与数据库连通(成功 200,数据库不可用 503)。
DEPLOY_DOCKER.md部署指南与.env.example(含 SECRET_KEY、JWT、MySQL 等必改项)。🐛 Fixes
SideBar组件导入路径大小写(Sidebar.vue→SideBar.vue),修复 Linux / Docker 构建环境下因文件名大小写不一致导致的失败。
CardTheme→CardThemeData,适配最新 Flutter SDK。🔄 Changes
base/profile迁移至rawfile(
buildinfo.json5、framesconfig.json)。🧹 Chores
.gitignore新增忽略 Flutter Windows / CMake 构建产物/build/。