refactor: 精简架构,去掉书籍管理,核心 TTS 代理

- 去掉 books/chapters CRUD、SQLAlchemy、SQLite 依赖
- 核心只剩 /api/tts + 智能分段 + 自动重试
- 新增 API_TOKEN 环境变量,管理接口 Bearer Token 鉴权
- 管理接口精简为 preview + config
- 前端重写:TTS 试听 + 配置查看 + 接口文档
- Dockerfile/docker-compose 清理,去掉数据库卷
This commit is contained in:
sunruiling
2026-03-27 15:10:58 +08:00
parent 30544f7f42
commit 2a87020b48
11 changed files with 381 additions and 1503 deletions

View File

@@ -1,14 +1,13 @@
#!/bin/bash
set -e
echo "🚀 TTS Book Service 一键部署"
echo "🎙️ TTS Proxy Service 一键部署"
echo "=============================="
# 1. 配置 Docker 镜像加速
# 1. Docker 镜像加速
DAEMON_JSON="/etc/docker/daemon.json"
if [ -f "$DAEMON_JSON" ]; then
echo "⚠️ $DAEMON_JSON 已存在,跳过镜像加速配置"
echo " 如需配置,请手动添加 registry-mirrors"
else
echo "📦 配置 Docker 镜像加速..."
sudo tee "$DAEMON_JSON" > /dev/null << 'EOF'
@@ -36,7 +35,7 @@ if [ ! -f .env ]; then
exit 1
fi
# 3. 启动服务
# 3. 启动
echo ""
echo "🐳 启动服务..."
docker compose up -d --build
@@ -44,5 +43,7 @@ docker compose up -d --build
echo ""
echo "=============================="
echo "✅ 部署完成!"
echo " 管理界面: http://$(hostname -I | awk '{print $1}'):3333"
echo " TTS 接口: http://$(hostname -I | awk '{print $1}'):3333/api/tts"
IP=$(hostname -I | awk '{print $1}')
echo " 管理界面: http://${IP}:3333"
echo " TTS 接口: http://${IP}:3333/api/tts"
echo " 健康检查: http://${IP}:3333/health"