Files
happy-life-star/PROJECT_STRUCTURE.md
T
peanut 26f0cdd760 feat: 完成项目整理优化和生产环境配置
🧹 项目结构优化:
- 删除重复和过时的文件
- 整理文档到docs目录结构
- 优化配置文件到configs目录
- 创建清晰的PROJECT_STRUCTURE.md

🔧 中间件配置:
- 重启MySQL/Redis/Nacos中间件
- 使用现有数据目录,确保数据完整性
- 统一密码配置: MySQL(EmotionMuseum2025*#), Nacos(Peanut2817*#)

🌐 Nginx配置:
- 配置前端路径: /emotion-museum
- 配置API代理: /api/ -> 19000
- 配置WebSocket代理: /ws/ -> 19007
- 添加健康检查端点: /health

📋 部署脚本优化:
- restart-middleware.sh - 中间件重启脚本
- setup-nginx.sh - Nginx配置脚本
- cleanup-project.sh - 项目清理脚本
- one-click-deploy.sh - 一键部署脚本

📖 文档完善:
- DEPLOYMENT_FINAL.md - 最终部署指南
- PROJECT_STRUCTURE.md - 项目结构说明
- 完整的运维和故障排查指南

 生产环境就绪:
- 中间件: MySQL/Redis/Nacos 运行正常
- Nginx: 反向代理配置完成
- 访问地址: http://47.111.10.27/emotion-museum
- 健康检查: http://47.111.10.27/health

🎯 项目现状:
- 10个微服务模块完整
- 前后端分离架构
- 容器化部署
- 统一配置管理
- 完整的部署和运维体系
2025-07-21 13:55:36 +08:00

105 lines
3.3 KiB
Markdown
Raw 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.
# 情感博物馆项目结构
## 📁 目录结构
```
emotion-museum/
├── 📁 backend/ # 后端微服务
│ ├── 📁 emotion-gateway/ # API网关服务
│ ├── 📁 emotion-user/ # 用户管理服务
│ ├── 📁 emotion-ai/ # AI聊天服务
│ ├── 📁 emotion-auth/ # 认证服务
│ ├── 📁 emotion-record/ # 记录管理服务
│ ├── 📁 emotion-growth/ # 成长跟踪服务
│ ├── 📁 emotion-explore/ # 探索服务
│ ├── 📁 emotion-reward/ # 奖励服务
│ ├── 📁 emotion-websocket/ # WebSocket服务
│ ├── 📁 emotion-stats/ # 统计服务
│ ├── 📁 emotion-common/ # 公共模块
│ ├── 🔧 build-all.sh # 构建脚本
│ ├── 🔧 deploy-all.sh # 综合部署脚本
│ ├── 🔧 deploy-remote.sh # 远程部署脚本
│ └── 📄 pom.xml # Maven父项目配置
├── 📁 web-flowith/ # 前端Vue项目
│ ├── 📁 src/ # 源代码
│ ├── 📁 public/ # 静态资源
│ ├── 🔧 deploy.sh # 前端部署脚本
│ └── 📄 package.json # 前端依赖配置
├── 📁 docs/ # 项目文档
│ ├── 📁 deployment/ # 部署相关文档
│ ├── 📁 architecture/ # 架构设计文档
│ └── 📁 database/ # 数据库相关文档
├── 📁 configs/ # 配置文件
│ ├── 📁 nginx/ # Nginx配置
│ ├── 📁 docker/ # Docker配置
│ └── 📁 env/ # 环境配置
├── 🔧 one-click-deploy.sh # 一键部署脚本
├── 🔧 restart-middleware.sh # 中间件重启脚本
├── 🔧 cleanup-project.sh # 项目清理脚本
└── 📄 README.md # 项目说明
```
## 🚀 快速开始
### 1. 一键部署
```bash
# 完整部署(前端+后端)
./one-click-deploy.sh
# 仅部署后端
./one-click-deploy.sh backend
# 仅部署前端
./one-click-deploy.sh frontend
# 健康检查
./one-click-deploy.sh check
```
### 2. 中间件管理
```bash
# 重启中间件(MySQL, Redis, Nacos
./restart-middleware.sh
```
### 3. 分步部署
```bash
# 构建后端
cd backend && ./build-all.sh
# 部署后端到远程
cd backend && ./deploy-remote.sh
# 部署前端
cd web-flowith && ./deploy.sh
```
## 📋 服务端口
| 服务 | 端口 | 描述 |
|------|------|------|
| emotion-gateway | 19000 | API网关 |
| emotion-user | 19001 | 用户服务 |
| emotion-ai | 19002 | AI服务 |
| emotion-record | 19003 | 记录服务 |
| emotion-growth | 19004 | 成长服务 |
| emotion-explore | 19005 | 探索服务 |
| emotion-reward | 19006 | 奖励服务 |
| emotion-websocket | 19007 | WebSocket服务 |
| emotion-auth | 19008 | 认证服务 |
| emotion-stats | 19009 | 统计服务 |
## 🔧 中间件端口
| 服务 | 端口 | 描述 |
|------|------|------|
| MySQL | 3306 | 数据库 |
| Redis | 6379 | 缓存 |
| Nacos | 8848 | 注册中心 |
## 📖 文档链接
- [部署指南](docs/deployment/)
- [架构设计](docs/architecture/)
- [数据库设计](docs/database/)