e262134148
删除内容: - KlingAI Provider、MiniMax Provider - Kling 视频/图片/TTS/语音克隆/形象克隆 Service 和 Scheduler Handler - 已废弃的 TTSService、VoiceCloneService - config 中 KLINGAI_*/MINIMAX_* 配置项 - ai_models.yaml 中 klingai 平台和模型配置 - docker-compose 中相关环境变量 - .env.example 中相关配置示例 - deploy-test.sh 中相关检查 - Makefile 中 klingai 语义检查排除规则 - KlingTaskStatus 枚举 修改内容: - model_router.py 移除 KlingAI 平台分支 - voice.py 重写,修复批量合成/文件保存中 service 未定义的 Bug - vidu_service.py 移除 MiniMax 相关注释 - script_handler.py 更新注释
106 lines
2.7 KiB
YAML
106 lines
2.7 KiB
YAML
# 美家卡智影 - 测试服部署配置
|
|
# ==============================
|
|
# 用法:
|
|
# docker-compose -f docker-compose.test.yml up -d --build
|
|
#
|
|
# 包含: PostgreSQL + Redis + API + Scheduler
|
|
# 独立运行,不依赖外部网络或服务
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: meijiaka-zy-db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: meijiaka_zy
|
|
volumes:
|
|
- /opt/meijiaka-zy/data/postgres:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- meijiaka-zy
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: meijiaka-zy-redis
|
|
volumes:
|
|
- /opt/meijiaka-zy/data/redis:/data
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- meijiaka-zy
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: meijiaka-zy-api
|
|
env_file: .env
|
|
environment:
|
|
- ENV=staging
|
|
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/meijiaka_zy
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- REDIS_DB=0
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- VOLCENGINE_API_KEY=${VOLCENGINE_API_KEY}
|
|
- VOLCENGINE_BASE_URL=${VOLCENGINE_BASE_URL:-https://ark.cn-beijing.volces.com/api/v3}
|
|
- VIDU_API_KEY=${VIDU_API_KEY}
|
|
- VIDU_BASE_URL=${VIDU_BASE_URL:-https://api.vidu.cn}
|
|
- ANYTOCOPY_API_KEY=${ANYTOCOPY_API_KEY}
|
|
- ANYTOCOPY_API_SECRET=${ANYTOCOPY_API_SECRET}
|
|
volumes:
|
|
- /opt/meijiaka-zy/data/logs:/root/Documents/Meijiaka-zy/logs
|
|
ports:
|
|
- "8081:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- meijiaka-zy
|
|
restart: unless-stopped
|
|
|
|
scheduler:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: meijiaka-zy-scheduler
|
|
env_file: .env
|
|
environment:
|
|
- ENV=staging
|
|
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/meijiaka_zy
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- REDIS_DB=0
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- VOLCENGINE_API_KEY=${VOLCENGINE_API_KEY}
|
|
- VIDU_API_KEY=${VIDU_API_KEY}
|
|
volumes:
|
|
- /opt/meijiaka-zy/data/logs:/root/Documents/Meijiaka-zy/logs
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
command: python -m app.scheduler.main
|
|
networks:
|
|
- meijiaka-zy
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
meijiaka-zy:
|
|
driver: bridge
|