b150cede84
✨ 新增功能: - 全量部署脚本 (backend/deploy-all.sh) - 支持一键部署所有微服务 - 单服务部署脚本 - 每个微服务独立部署脚本 - 前端部署脚本 (web-flowith/deploy.sh) - Vue应用自动构建部署 - Jenkins CI/CD 支持 - 完整的Pipeline配置 �� 部署特性: - 容错机制: 单个服务失败不影响其他服务部署 - 详细报告: 完整的部署状态统计和错误日志 - 容器化: 使用Docker进行服务部署 - 健康检查: 自动验证服务启动状态 - 版本备份: 自动备份旧版本支持快速回滚 🛠️ 技术改进: - emotion-auth服务启动问题修复 - 跨域配置优化 - 数据库连接配置统一 - OAuth服务实现完善 - WebSocket依赖更新 📚 文档: - Jenkins部署说明文档 - 部署脚本使用指南 - 故障排查手册 🌐 部署环境: - 目标服务器: 47.111.10.27 - 容器化部署到 /data/builds - 前端部署到 /data/www/emotion-museum - 支持test/prod环境配置
145 lines
3.4 KiB
YAML
145 lines
3.4 KiB
YAML
# 生产环境配置
|
|
|
|
spring:
|
|
cloud:
|
|
nacos:
|
|
discovery:
|
|
server-addr: 47.111.10.27:8848
|
|
namespace: prod
|
|
group: DEFAULT_GROUP
|
|
enabled: true
|
|
username: nacos
|
|
password: EmotionMuseum2025
|
|
metadata:
|
|
version: 1.0.0
|
|
zone: prod
|
|
register-enabled: true
|
|
ephemeral: true
|
|
cluster-name: DEFAULT
|
|
service: ${spring.application.name}
|
|
weight: 1
|
|
heart-beat-interval: 5000
|
|
heart-beat-timeout: 15000
|
|
ip-delete-timeout: 30000
|
|
config:
|
|
server-addr: 47.111.10.27:8848
|
|
namespace: prod
|
|
group: DEFAULT_GROUP
|
|
file-extension: yml
|
|
enabled: false
|
|
username: nacos
|
|
password: EmotionMuseum2025
|
|
|
|
gateway:
|
|
discovery:
|
|
locator:
|
|
enabled: true
|
|
lower-case-service-id: true
|
|
|
|
routes:
|
|
# 用户服务路由 (包含认证功能)
|
|
- id: emotion-user-route
|
|
uri: lb://emotion-user
|
|
predicates:
|
|
- Path=/user/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 验证码服务路由
|
|
- id: emotion-captcha-route
|
|
uri: lb://emotion-user
|
|
predicates:
|
|
- Path=/captcha/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# OAuth服务路由
|
|
- id: emotion-oauth-route
|
|
uri: lb://emotion-user
|
|
predicates:
|
|
- Path=/oauth/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# AI服务路由
|
|
- id: emotion-ai-route
|
|
uri: lb://emotion-ai
|
|
predicates:
|
|
- Path=/ai/**
|
|
filters:
|
|
- StripPrefix=1
|
|
|
|
# WebSocket聊天服务路由
|
|
- id: emotion-websocket-route
|
|
uri: lb://emotion-websocket
|
|
predicates:
|
|
- Path=/websocket/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# WebSocket连接路由 (支持WebSocket升级)
|
|
- id: emotion-websocket-ws-route
|
|
uri: lb://emotion-websocket
|
|
predicates:
|
|
- Path=/ws/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 情绪记录服务路由
|
|
- id: emotion-record-route
|
|
uri: lb://emotion-record
|
|
predicates:
|
|
- Path=/record/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 成长课题服务路由
|
|
- id: emotion-growth-route
|
|
uri: lb://emotion-growth
|
|
predicates:
|
|
- Path=/growth/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 地图探索服务路由
|
|
- id: emotion-explore-route
|
|
uri: lb://emotion-explore
|
|
predicates:
|
|
- Path=/explore/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 成就奖励服务路由
|
|
- id: emotion-reward-route
|
|
uri: lb://emotion-reward
|
|
predicates:
|
|
- Path=/reward/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# 统计分析服务路由
|
|
- id: emotion-stats-route
|
|
uri: lb://emotion-stats
|
|
predicates:
|
|
- Path=/stats/**
|
|
filters:
|
|
- StripPrefix=0
|
|
|
|
# Redis配置
|
|
data:
|
|
redis:
|
|
host: 47.111.10.27
|
|
port: 6379
|
|
password: EmotionMuseum2025*#
|
|
database: 0
|
|
|
|
# 日志配置
|
|
logging:
|
|
level:
|
|
com.emotionmuseum: warn
|
|
org.springframework.cloud.gateway: warn
|
|
org.springframework.web: warn
|
|
com.alibaba.nacos: error
|
|
file:
|
|
name: logs/emotion-gateway-prod.log
|